This is WAT makes TypeScript good

By now I’m sure you have all seen the hilarious WAT video, but if not here it is for your viewing pleasure:

The very first question that the speaker Gary Bernhardt poses (after the Ruby parts) is that of what is expected when you execute the following javascript:

[ ] + [ ]

He says in that video that he would expect an empty array to result or he would also accept a Type error. But what you actually get when this is run is an empty string. Then we all WAT and laugh. He shows a few other examples of questionable things that javascript will do without any problems whatsoever.

So lets take this famous WAT-inducing example over to the TypeScript playground and lets see what happens…

Type error! So this is wat makes TypeScript good 🙂

Author: justinmchase

I'm a Software Developer from Minnesota.

Drop a brain bomb

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.