This file contains 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 IMMUTABLE - STRING | |
let nama1 = 'hinata' | |
let nama2 = nama1 + ' shoyo' | |
console.log(nama1) // akan menampilkan 'hinata' | |
console.log(nama2) // akan menampilkan 'hinata shoyo' |
This file contains 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 IMMUTABLE - NUMBER | |
let umur1 = 15 | |
let umur2 = umur1 - 5 | |
console.log(umur1) // akan menampilkan 15 | |
console.log(umur2) // akan menampilkan 10 |
This file contains 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 - OBJECT LITERAL | |
let pemain1 = {nama: 'hinata', umur: 15} | |
let pemain2 = pemain1 | |
pemain2.nama = 'shoyo' | |
console.log(pemain1) // akan menampilkan {nama: "shoyo", umur: 15} | |
console.log(pemain2) // akan menampilkan {nama: "shoyo", umur: 15} |
This file contains 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"] |
This file contains 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 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 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 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 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 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 |
OlderNewer