JavaScript Interview Questions:
1. Input: array=[3,4,5,6,7,8,9]
Output: 4,5,6,7,8,9,10
2. var obj={name:"test"}
Replace the the text of div with the value of name key from an above JavaScript object.
<div id="test">This is a text</div>
3. for(var i=0; i<3; i++){
setTimeout(() =>console.log(i)
},2000);
What it will print in console of the browser?
Output: 4,5,6,7,8,9,10
2. var obj={name:"test"}
Replace the the text of div with the value of name key from an above JavaScript object.
<div id="test">This is a text</div>
3. for(var i=0; i<3; i++){
setTimeout(() =>console.log(i)
},2000);
What it will print in console of the browser?
Comments
Post a Comment