Last active
February 21, 2022 22:53
-
-
Save blarfoon/84531f113f4098ca06c265a00f995105 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 = Object.create(myObjectFunc.prototype) | |
myObjectFunc.call(myObject) | |
// This will not work as intended! | |
myObjectFunc.hello = "world"; | |
console.log(myObject); // undefined! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment