Test Your Knowledge With The JS Is Weird Quiz
Written by Nikos Vaggalis   
Friday, 08 September 2023

How well do you know JavaScript? Put your knowledge to test with the interactive quiz tailored to devs who think they know it all. 

It is true that all web applications are directly written or are transpiled to JavaScript. It does really drives the web because it's easy to get started with and with it you can make functional web sites quickly and without much ado.

To that end most people employ the 'standard' language feature and never look back. However, the language is more powerful and nuanced if you look just under the tip of the iceberg as the language's subtleties can really trip you up in unexpected ways.

Many people for example get confused by:

  • Which equals operator (== vs ===) should be used in comparisons?
  • What is the difference between null and undefined?
  • Concatenations: what will
       1 + "1" or 1 - "1"
  • What are the variable scopes? let, var and const have different scopes
  • Three-way comparison
      1 < 2 < 3; //true
      3 > 2 > 1; //false
    why is that so?

and so on.

The "JS Is Weird" quiz goes beyond the ordinary usage of the language. It is comprised of 25 mind bending questions
that will make you question your knowledge of the language. For instance, I know of a great, great programmer
who solved 14 out of 25. Is it really so difficult? Let's find out.


The quiz begins with "easy" questions like the very first one :

what does "true + false" make ?

pick your choice!


and steadily increases the difficulty level, i. e what give the following?



"" - - ""

Towards then end it peaks with questions like

undefined + false


+!!NaN * "" - - [, ]

Upon completion, you are presented with a nice overview of which problems you solved and which you failed, along
with the actual explanation and correct answer.

Admittedly most of the quiz questions no one will encounter in their day to day programming as they mostly look like parts of an obfuscation context. However, the point is that the quiz goes to highlight the depths that this nevertheless simplistic language can get to. If on the other hand you managed to get the most or all correctly then you are a true Hacker.

If you do find this quiz useful or fun you might also want to check the wfjs Github repo which hosts many more funny and tricky JavaScript examples.

If you want to explore JavaScript in greater depth have a look at Just JavaScript: An Idiomatic Approach and JavaScript Jems: The Amazing Parts, two titles from the I Programmer Library - and you'll find lots of extracts from them in our JavaScript section.

javascript image


More Information

JS is weird


Related Articles

Learn JavaScript and Node.js With Microsoft

js1024 - How Much Awesomeness Can You Pack In Just 1K?


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Rust's Rapid Rise on TIOBE Index

Rust is making spectacular progress up the TIOBE index and JavaScript is also on the up and experiencing a personal best. Kotlin is maintaining its inclusion in the top 20 and the gap at the very top  [ ... ]

Udacity's iOS Nanodegree Completely Revamped

Udacity has refreshed its iOS Developer Nanodegree Program. The latest version, iOS Development with SwiftUI and SwiftData is intended to take 5 months.

More News

kotlin book



or email your comment to: comments@i-programmer.info



Last Updated ( Friday, 08 September 2023 )