This is an old post from 2020. I'm keeping it here for archival purposes.
0.1 + 0.2 = Test live
What happens if you print this out? You get this: 0.30000000000000004
Well that is a floating point issue, where precision is limited. This can happen in other programming languages as well.
Try some of these too:
But what about this:
! + ; = Test live
1. ! +  2. false +  3. "false" + ""
converts an array into a number, which is 0.
Now with this knowledge and because we can use a string similar to an array (e.g.
'false' = 'f'), we can create something beautiful like this: 😎
let hello = ( + !)[+] + ( + !!)[+!!] + ([!] + [])[+!+ + [+]] + ([!!] + [])[+!+ + [+!!]] + ([] + )[!! + !] + ([!!] + !+ + [])[+!+ + [+]]; console.log(hello);
Go ahead and try it yourself in your browser developer console! Or click the link below.
console.log(hello) => Test live
Someone made a guide on how to program just with these 6 characters: https://github.com/aemkei/jsfuck