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
<script> | |
// contoh benar | |
let a = ""; | |
function aku(){ | |
a = "apa cuk"; | |
alert(a); | |
} | |
aku(); | |
// contoh benar dalam scope |
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
<script> | |
function hay(){ | |
var hey = ""; | |
} | |
function ubah() { | |
hey = "hallo teman"; | |
} | |
ubah(); |
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
<script> | |
var ab = "hallo dunia"; | |
function test() { | |
ab = "hello world"; | |
alert(ab); | |
} | |
test(); | |
</script> |
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
<script> | |
var sound = new Howl({ | |
src: ['sound.mp3'] | |
}); | |
sound.play(); | |
</script> |
NewerOlder