Skip to content

Tag: JavaScript

2 min readJavaScript

Why JavaScript “++[[]][+[]]+[+[]]” expression returns string “10”

Recently I came over quite interesting expressions ++[[]][+[]]+[+[]] and if you open browser JavaScript console and paste it there it will return string “10”, but how it really works? This is something that took my mind yesterday and I decided to make it clear for me: Firstly, +[] in JavaScript is the same as +”” … Continue reading Why JavaScript “++[[]][+[]]+[+[]]” expression returns string “10”