This content originally appeared on DEV Community and was authored by Ashutosh Sarangi
1. What are tradeoff in Event Delegation
2. What are Workers
3. Web Storage
4. HTTP methods
5. Browser Apis
6. IndexDb
7. Web Storage Capacity, not Local Storage and Session Storage.
8. Types of Observer
9. Intersection Observer
10. Service Worker and WebWorker
Ans:- https://dev.to/ashutoshsarangi/web-worker-vs-service-worker-5h50
11. Event Bubbling and Event Captureing, default argument and syntax, eventListner
12. PWA
13. background sync
14. High Performance
Browser Networking
- http1 vs http2
- Server Send Events
- webRTC
- polling → long polling vs short polling
- WebSocket
- sockett.io
15. debounce Vs Thruttling
const debFun = (fn, delay = 200) => {
let timeCounter;
return (...args) => {
if (timeCounter) {
clearTimeout(timeCounter);
}
timeCounter = setTimeout(() => {
fn(...args);
timeCounter = null;
}, delay);
};
};
const print = () => console.log('Hello');
const testFun = debFun(print);
setInterval(() => { testFun(); }, 300);
function throttle(fn, delay) {
let lastCall = 0;
return function(...args) {
const now = new Date().getTime();
if (now - lastCall < delay) {
return;
}
lastCall = now;
return fn(...args);
};
}
const print = () => console.log('Hello');
const throttledPrint = throttle(print, 200);
setInterval(() => {
throttledPrint();
}, 100);
This content originally appeared on DEV Community and was authored by Ashutosh Sarangi
Ashutosh Sarangi | Sciencx (2024-09-21T07:07:24+00:00) Expert Javascript Interview Preparation. Retrieved from https://www.scien.cx/2024/09/21/expert-javascript-interview-preparation/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.