Last active
February 15, 2021 10:37
-
-
Save mr-pascal/18605d08413e733654ee97212323241b to your computer and use it in GitHub Desktop.
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
// Numbers | |
(() => { | |
let a = 5; | |
let b = a; | |
a = 6; | |
console.log(`-- Number --`); | |
console.log(`a: ${a}`); // a: 6 | |
console.log(`b: ${b}`); // b: 5 | |
console.log(`\n`); | |
})(); | |
// Strings | |
(() => { | |
let a = 'Hello'; | |
let b = a; | |
a = 'HELLO'; | |
console.log(`-- String --`); | |
console.log(`a: ${a}`); // a: HELLO | |
console.log(`b: ${b}`); // b: Hello | |
console.log(`\n`); | |
})(); | |
// Booleans | |
(() => { | |
let a = true; | |
let b = a; | |
a = false; | |
console.log(`-- Boolean --`); | |
console.log(`a: ${a}`); // a: false | |
console.log(`b: ${b}`); // b: true | |
console.log(`\n`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment