Hacker News with Generative AI: Tricky Code
« Back to main
Why does ++[[]][+[]]+[+[]] return the string "10"?
(stackoverflow.com)
This is valid and returns the string "10" in JavaScript (more examples here):
JavaScript
,
Programming
,
Code
,
Puzzles
,
Tricky Code
32 points by downboots 103 days ago |
29 comments