Re:Are You a JavaScript Guru? Try This Test
by account_taken on Saturday February 02, 2013 @03:39PM
(#5157248)
I have been asked questions like this before in interviews and it makes me wonder if the technical interviewers were so indifferent about their jobs they would pull clever questions from the web instead of practical questions applicable to the position. I rarely answer these clever questions correctly and I've been doing JS for a while.
Re:Are You a JavaScript Guru? Try This Test
by jonny_eh on Saturday February 02, 2013 @03:43PM
(#5157265)
Much more relevant JS interview questions would be relevant to scope. Considering understanding nuances of scope in JS is what differentiates beginners from the experienced.
Re:Are You a JavaScript Guru? Try This Test
by minikomi on Saturday February 02, 2013 @05:53PM
(#5157708)
this.
Re:Are You a JavaScript Guru? Try This Test
by afshin on Saturday February 02, 2013 @06:35PM
(#5157827)
Bravo.
Re:Are You a JavaScript Guru? Try This Test
by troels on Saturday February 02, 2013 @02:12PM
(#5156937)
Also, it's so absurd that you would remember it.
Re:Are You a JavaScript Guru? Try This Test
by skrebbel on Saturday February 02, 2013 @02:55PM
(#5157091)
Are you sure? The only reason why it's absurd is because deep inside, Number knows that it should've really been called PossiblyANumber. It's a different abstraction and an unfortunate naming collision.
Re:Are You a JavaScript Guru? Try This Test
by svachalek on Saturday February 02, 2013 @04:20PM
(#5157365)
Weird, for me the hard part was being sure it was a trick question and thus trying to come up with an answer other than "number" that made sense. I couldn't so I guess I got it right. What else could it possibly be?
The only slightly relevant question, I thought, was what typeof NaN was. Not knowing that might result is actual bugs.