Last active
May 18, 2019 17:57
-
-
Save sartak/9441c244ce7ca46fc3eb96eb3a71053f 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
[].__proto__.__proto__ = new Proxy({}, { get: (_, n) => n < 0 ? [] : [...[][n-1], n] }) | |
// Proxy {} | |
[][5] | |
// (6) ["0", "1", "2", "3", "4", "5"] | |
[][42] | |
// (43) ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42"] | |
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
CC0 1.0 Universal | |
To the extent possible under law, Shawn M Moore has waived all copyright and | |
related or neighboring rights to [].js. | |
Definitely feel free to use this in production. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment