DEV Community

Ashutosh Sarangi
Ashutosh Sarangi

Posted on

3 1 1 1 2

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);
Enter fullscreen mode Exit fullscreen mode
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);
Enter fullscreen mode Exit fullscreen mode

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay