Check out =mohamedraoof‘s work on DeviantArt.com
Obscure JavaScript
My colleague, pasted an interesting javaScript idiom to our developer chat, some time ago, and it immediately caught my attention. If you cast an array literal to a number, prepending it with a ‘+’ operator, it will evaluate to 0.
1 | var a = +[]; |
Heh, something so logical, yet obscure, immediately inspired me to take this a bit further.