Created
November 25, 2019 14:27
-
-
Save sag1v/334e2bd77434960125644dc3610b0d7d to your computer and use it in GitHub Desktop.
Markdium-JavaScript - The prototype chain in depth
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
const player1 = Object.create(null) | |
player1.userName = 'sag1v'; | |
player1['score'] = 700; | |
player1.setScore = function(newScore) { | |
player1.score = newScore; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment