Last active
November 24, 2021 14:24
-
-
Save rahgurung/93db5a7d658fdea375952442ae74ef21 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
function increase() { | |
// increment each time | |
this.x++; | |
} | |
// Create a property to the function object | |
increase.x = 0; | |
// Call function few times | |
increase(); | |
increase(); | |
console.log(increase.x); // 0 which means this doesn't refers the function itself |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment