Skip to content

Instantly share code, notes, and snippets.

@avelino
Created December 29, 2011 02:45
Embed
What would you like to do?
++[[]][+[]]+[+[]]
> test = []
[]
> test = test + 1
"1"
> typeof test
"string"
------------------------------------
> lero = ++[[]][+[]]+[+[]]
"10"
> typeof lero
"string"
@avelino
Copy link
Author

avelino commented Dec 29, 2011

Isso é horrivel,
",,," == new Array(4); // true

Onde uma string pode virar um array de 4?

@avelino
Copy link
Author

avelino commented Dec 29, 2011

Como pode isso:
function Dude(name){
this.name = name;
return {name: 'Doug'};
}

var bob = new Dude('Bob');
bob == Dude("test") // false

Troll face

@henvic
Copy link

henvic commented Dec 29, 2011

hahahahaha

@suissa
Copy link

suissa commented Dec 29, 2011

Coisa de maluco mesmo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment