Last active
February 21, 2022 22:53
-
-
Save blarfoon/95da3de4818b123b1e4405737df84921 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
function myObjectFunc() { | |
this.hi = "mom"; | |
} | |
const myObject = new myObjectFunc(); | |
// This will not work as intended! | |
myObjectFunc.hello = "world"; | |
console.log(myObject.hello); // undefined! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment