WAT – by Gary Bernhardt

20 Aug, 2012

Do you guys know what Wat means?

Let’s talk about Javascript.

[] + []  = “”

[] + {} = [object Object]

{} + [] = 0

{} + {} = NaN

Array(16).join(“wat”) = watwatwatwatwatwatwatwatwatwatwatwatwatwatwatwat

Array(16).join(“wat” + 1) = wat1wat1wat1wat1wat1wat1wat1wat1wat1wat1wat1wat1wat1wat1wat1wat1

Array(16).join(“wat” – 1) = Watch the flipping video for the punchline!

About the author

Gregory

I am an ex-pat Newfoundlander who has uprooted and moved to the big city of Toronto. I develop web applications for work and for fun. I play ultimate and ice hockey year-round and camp every chance my girlfriend will let me.

Leave a reply