This was interesting if nothing else.<p>Maybe its just because I just woke up, but I didn't even realise why Q1 was interesting until after I read the HN comments. Those that are saying these are all useless for practical work are wrong in my opinion. Some of them are, but not all.<p>If you saw Q2 and didn't realise the possibility of it being false, the reasons for that are something you need to learn when dealing with any language that uses floating points. Q3 is something every JS programmer should know, as is Q4.<p>Q5 is more interesting, because the correct answer is "what version of javascript?" Protected terms cannot be used as object properties without being put in quote marks in earlier versions of JS. Doing something like this in an older browser would throw an error.<p>Q6 could have been better, it would be pretty hard to get it wrong. Something like "5" + 2 would have been more interesting because + is overloaded so you would have to know how javascript treated it in different situations, which is close to essential knowledge.<p>Q7 is definitely just trivia. No sane person writes code like that. Q8 is trivia too; easy if youre familiar with JS but not hugely useful. Q9 is easily guessable; I didn't know what the param for toString did but I guessed it correctly.<p>Q10 is important, if you dont know how JS treats numbers with a leading 0 you can get yourself into trouble and have no idea why.<p>Q11 I learned something new, I didn't know about the ~ operator, I wouldn't use it in regular code though.<p>Q12 is regex. Either you knew it or you didn't. If you didn't, you learned about \b, which can be rather useful.