123-Essential-JavaScript-Interview-Questions icon indicating copy to clipboard operation
123-Essential-JavaScript-Interview-Questions copied to clipboard

NEW QUESTION :-ninja-level JavaScript questions

Open Nsanjayboruds opened this issue 1 year ago • 2 comments

Hi team,

I’d like to add a new section of ninja-level JavaScript questions for advanced learners and interview prep. These questions are tricky, edge-case, or uncommon topics that even experienced developers often get wrong.

Some example questions I propose:

  1. Why does console.log(a); var a = 10; print undefined? Explain hoisting.
  2. Explain why [] == ![] evaluates to true.
  3. Difference between NaN === NaN and Object.is(NaN, NaN).
  4. What will for(var i=0;i<3;i++){ setTimeout(()=>console.log(i),1000); } print and why?
  5. Explain why typeof null returns "object".
  6. What will console.log([] + {}) print? Why?
  7. Explain sparse arrays like: let a=[1,2,3]; a[10]=99; console.log(a.length);

I can contribute a full list of 20–30 ninja-level JS questions with explanations for the repo if approved.

Thanks!

Nsanjayboruds avatar Oct 11 '25 09:10 Nsanjayboruds

go ahead!

ganqqwerty avatar Oct 11 '25 12:10 ganqqwerty

thank you

Nsanjayboruds avatar Oct 12 '25 05:10 Nsanjayboruds