Last active
February 22, 2022 00:21
-
-
Save blarfoon/27cd7ff16641a81e6006d3f2e2e3d901 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
const myArray = [1, 2, 3]; | |
Object.defineProperty(myArray, "hi", { | |
value: "mom", | |
}); | |
myArray.hello = "world"; | |
console.log(myArray); | |
for (const key in myArray) { | |
console.log("key:", key); | |
} | |
for (const value of myArray) { | |
console.log("value:", value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment