r/coding • • Aug 09 '17

Test your Javascript skills with our fun Javascript test!

https://www.atlascode.com/blog/test-your-javascript-skills-with-our-fun-javascript-test/
24 Upvotes

9 comments sorted by

View all comments

8

u/bigjoebegs Aug 09 '17

Three quick things:

  1. The correct answer to #4 is actually "B".

  2. ParseInt isn't really relevant. I never use it and I don't know why knowing parseInt('ABC') would be useful.

  3. I put quotes around my string answers and got one wrong because of it (wrote 'AB' when the answer was AB)

All around, nice work, but this needs touching up.

0

u/ItsAllInYourHead Aug 09 '17
  1. You're wrong: variable1 is hoisted at line 3.

  2. What do you mean by "isn't really relevant"? Isn't relevant to what?

3

u/bigjoebegs Aug 09 '17

Admittedly I was wrong about parseInt(). I've just been using "+" in front of my string, but after digging into it you guys are right.

Not sure what you're talking about in your first point.

-3

u/ItsAllInYourHead Aug 09 '17

Well perhaps you should read up on variable hoisting then.