Expert Javascript Interview Preparation

expert-javascript-interview-preparation

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);
Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
project-management-vs-program-management

Project Management vs Program management

Next Post
waymap-v10.3-–-web-vulnerability-scanner

Waymap v1.0.3 – Web Vulnerability Scanner

Related Posts