-
-
Save kranfix/4b1774e940cc112098e7e559fb5a8323 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
class Foo { | |
constructor(){ | |
this.bar = "Hello!"; | |
} | |
} | |
let foo = new Foo() | |
console.log(`${foo.bar} == ${foo["bar"]}`) | |
console.log("----------------------------") | |
foo.bar = "Good bye" | |
console.log(`${foo.bar} == ${foo["bar"]}`) | |
console.log("----------------------------") | |
foo["bar"] = "See you!" | |
console.log(`${foo.bar} == ${foo["bar"]}`) | |
console.log("----------------------------") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment