Created
December 29, 2011 02:45
-
-
Save avelino/1531375 to your computer and use it in GitHub Desktop.
++[[]][+[]]+[+[]]
This file contains hidden or 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
> test = [] | |
[] | |
> test = test + 1 | |
"1" | |
> typeof test | |
"string" | |
------------------------------------ | |
> lero = ++[[]][+[]]+[+[]] | |
"10" | |
> typeof lero | |
"string" |
O tipagem FDP
"5" + 1 == "51"
"5" - 1 == 4
function teste () { return teste }
teste()()()()()()()()()()()()()() //quase um fork bomb em JS :P
AHUhahuahuhuahuahuhuahuaHAhua QUE MEDO!!!!
e essa?
0.1 + 0.2 = 0.30000000000000004
0.1 + 0.21 = 0.31
0.2 + 0.1 = 0.30000000000000004
Isso é devido à aritmética de ponto flutuante. Python tem isso também. Veja http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
Em tempo: http://wtfjs.com/
Isso é horrivel,
",,," == new Array(4); // true
Onde uma string pode virar um array de 4?
Como pode isso:
function Dude(name){
this.name = name;
return {name: 'Doug'};
}
var bob = new Dude('Bob');
bob == Dude("test") // false
Troll face
hahahahaha
Coisa de maluco mesmo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EcmaScript é bizarro :P