This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let manusia = { | |
nama: 'Dimas', | |
umur: 20, | |
peliharaan: { | |
ikan: 'Lemon', | |
} | |
} | |
let klonManusia = {...manusia} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Kloning array | |
let kucing = ['leo', 'lui'] | |
let klonKucing = [...kucing] | |
console.log(kucing) | |
// ["leo", "lui"] | |
// kita ubah nilai kucing | |
kucing.push('darkness') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Nilai Primitive | |
umurDimas = 40 | |
// Nilai Reference | |
kucing.push('darkness') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Nilai Primitive | |
let umurDimas = 20 | |
let umurKirana = umurDimas | |
// Nilai Reference | |
let kucing = ['leo', 'lui'] | |
let kucingDua = kucing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const calculateCombination = (arr, r) => { | |
const data = []; | |
combinationUtil(arr, data, 0, arr.length - 1, 0, r); | |
return calculate(result); | |
}; | |
const combinationUtil = (arr, data, start, end, index, r) => { | |
if (index == r) { | |
for (let j = 0; j < r; j++) { | |
result.push(data[j]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HLRTelkomsel = { | |
jawaTimur: [ | |
'6281130', | |
'6281131', | |
'6281132', | |
'6281133', | |
'6281134', | |
'6281137', | |
'6281135', | |
'6281136', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HLRTelkomsel = { | |
jawaTimur: [ | |
'6281130', | |
'6281131', | |
'6281132', | |
'6281133', | |
'6281134', | |
'6281137', | |
'6281135', | |
'6281136', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (min-width: 375px) {} | |
@media screen and (min-width: 411px) {} | |
@media screen and (min-width: 540px) {} | |
@media screen and (min-width: 768px) {} | |
@media screen and (min-width: 1024px) {} | |
@media screen and (min-width: 1280px) {} | |
@media screen and (min-width: 1440px) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const input = document.querySelectorAll("[contenteditable='true']")[1]; | |
function dispatch(input, message) { | |
var evt = new InputEvent('input', { | |
bubbles: true, | |
}); | |
input.innerHTML = message; | |
input.dispatchEvent(evt); | |
document.querySelector('span[data-icon="send"]').click(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CONTOH MUTABLE - ARRAY | |
let kombinasi1 = ['setter', 'libero', 'spiker'] | |
let kombinasi2 = kombinasi1 | |
kombinasi2.push('blocker') | |
console.log(kombinasi1) // akan menampilkan ["setter", "libero", "spiker", "blocker"] | |
console.log(kombinasi2) // akan menampilkan ["setter", "libero", "spiker", "blocker"] |