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
Hoistingin JS and How it works? - What is the difference between
letandvar? - What is
Event Loop? - What is precedence in
Event Loop? - What is the difference between
setTimeoutandsetInterval? - Where do you use
RestOperator? - Have you heard of
array.reverse()? - What is meant by Shallow copy and Deep copy?
- What is
Closure? - Have you used
reducefunction in JS? - What is the difference between
mapandreduce? - What are the parameters the
mapfunction accepts? - What is the difference between a
Promiseand aCallback? - What
positionproperty inCSShave you used and what is the difference between them? - What is
Flexbox? - What is the difference between
display:noneandvisibility: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 ➡️
