Last active
January 4, 2021 21:30
-
-
Save codingedgar/76f8772ade110b6c1d2c8d4a98f9876f to your computer and use it in GitHub Desktop.
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
console.group('State of JS'); | |
const randomCat = new Cat(); | |
console.assert(randomCat.name === undefined); | |
if (!randomCat.name) { | |
randomCat.name = 'Pepo'; | |
} | |
console.assert(randomCat.name === 'Pepo'); | |
console.groupEnd(); | |
/* | |
Console: | |
State of JS | |
get called undefined | |
get called undefined | |
set called Pepo | |
get called Pepo | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment