Predict the output - I
_8function x() {_8 setTimeout(() => {_8 console.log(i);_8 }, 1000);_8 var i = 1;_8}_8_8x();
Answer
_11
Predict the output - II
_8console.log(1);_8setTimeout(function () {_8 console.log(2);_8}, 1000);_8setTimeout(function () {_8 console.log(3);_8}, 0);_8console.log(4);
Answer
_11
Parse recursive tree
_32const data = [_32 {_32 name: "Menu 1",_32 link: "http://gooogle.com",_32 subitems: [_32 {_32 name: "Menu 2",_32 link: "http://gooogle.com",_32 },_32 ],_32 },_32 {_32 name: "Menu 3",_32 link: "http://gooogle.com",_32 subitems: [_32 {_32 name: "Menu 4",_32 link: "http://gooogle.com",_32 subitems: [_32 {_32 name: "Menu 5",_32 link: "http://gooogle.com",_32 },_32 {_32 name: "Menu 6",_32 link: "http://gooogle.com",_32 },_32 ],_32 },_32 ],_32 },_32];
JS Questions
- What is
Hoisting
in JS and How it works? - What is the difference between
let
andvar
? - What is
Event Loop
? - What is precedence in
Event Loop
? - What is the difference between
setTimeout
andsetInterval
? - Where do you use
Rest
Operator? - Have you heard of
array.reverse()
? - What is meant by Shallow copy and Deep copy?
- What is
Closure
? - Have you used
reduce
function in JS? - What is the difference between
map
andreduce
? - What are the parameters the
map
function accepts? - What is the difference between a
Promise
and aCallback
? - What
position
property inCSS
have you used and what is the difference between them? - What is
Flexbox
? - What is the difference between
display:none
andvisibility:hidden
? - What is
Memoization
? - How do you ensure your code has high quality?
Deployment
- Vercel, AWS S3
- CI/CD Tool?
Test must pass
Write the implementation of the product
function for the below test to pass
_2product(4, 5); // 20_2product(4)(5); // 20
@ragavkumarv
swipe to next โก๏ธ