CareerKit
← All ebooks
JavaScriptJavaScript Output QuestionsCareerKit
  • TopicJavaScript
  • LevelIntermediate
  • Length68 pages
  • Inside100 questions
  • FormatPDF

JavaScript Output Questions

Tricky "what does this print" questions with step-by-step explanations of why.

What's inside

  1. Hoisting and the temporal dead zone
  2. Closures inside loops
  3. this in different contexts
  4. Type coercion surprises
  5. Promises and setTimeout ordering

Sample from the ebook

What does console.log([] + []) print?

An empty string. Both arrays are converted to strings, and an empty array becomes "", so the result is "" + "".

₹199Was ₹39950% off

Free sample questions

Read 10 full answers from this ebook for free, and see all 100 questions it covers.

JavaScript Output Questions with Answers →