JavaScript Question

What is the output below code?

for(let i=1; i<5; i++){
setTimeout(()=>{console.log(i)},1000)
}

a.  5,5,5,5   b.  1,1,1,1    c. undefined   d. 1,2,3,4 


What will the output of the statement be?

console.log(0 == false)

a. False b. Nan c. True

Comments