JavaScript Interview Questions For 3 Years Of Experience

Pravin M
3 min readAug 17, 2023
JavaScript Interview Questions
  1. What is Callback hell ?
  2. Explain promises in JavaScript ?
  3. Difference between observable and a promise
  4. How to create custom events in JavaScript ?
  5. Difference between prototype and _proto_ ?
  6. Explain prototypal inheritance in JavaScript ?
  7. Difference between for in and for of loop ?
  8. Difference between get and post methods ?
  9. Difference between post and put methods ?
  10. When we pass an object to a function are they passed by reference or by value ?
  11. What are the design patterns in JavaScript ?
  12. What do u understand by the terms mutable and immutable in JavaScript ?
  13. What is Async and Await in JavaScript ?
  14. Is array a data type ?
  15. How can we overwrite any JavaScript inbuilt property (like array.push())
  16. Explain exception handling in JavaScript ?
  17. Difference between a transpiler and a compiler ?
  18. How to apply conditional breakpoints in chrome browser debugging tool ?
  19. How to check if a number is an integer without using math function and without converting number into string or array ?
  20. Use of JavaScript clearInterval() ?
  21. How to define a private method or variable inside a class in JavaScript or ES6 ?
  22. Can arrow functions be used as constructor functions ?
  23. What is Map in JavaScript ?
  24. How to implement authentication in a website ?
  25. How would you implement pagination using JavaScript ?
  26. Difference between a browser tab and a window in context of localstorage and sessionstorage ?
  27. What is oauth in context of jwt ?
  28. What is nginx used for ?
  29. How to change the redirection URLs after the build has been made ?
  30. What is a JWT , what are it’s parts and what is its use ?
  31. What are ‘set’ in javascript ?
  32. Do we have reverse() method on javascript string ?
  33. Name some array methods in JavaScript ?
  34. Which operation is faster among == and === ?
  35. Why storing JWT in cookie is safer than storing JWT in session storage or local storage? Is storing in cookie 100 percent safe ? what if I copy JWT from cookie in the browser debug panel and use it in a CSRF attack ?
  36. Explain Array’s sort method for sorting numbers. What is the time complexity of this method ?
  37. What is quick sort and what is it’s time complexity ?
  38. Write a code to flatten the contents of an object ?
  39. What is Micro frontend architecture ?
  40. What is the difference between first class function and higher order function ?
  41. What is temporal dead zone ?
  42. What is the seal method in JavaScript ?
  43. What is functional programming in JavaScript ?
  44. Difference between put and patch method in javascript ?
  45. What is a REST API ?
  46. How to convert an object to an Array in JavaScript ?
  47. How to deep clone in JavaScript ?
  48. How to flatten an array in JavaScript ?
  49. What is debounce in JavaScript ?
  50. What is memoization in JavaScript ?
  51. How to write a function ‘Sum’ such that on calling sum(a)(b)©….() where a,b,c etc are numbers , the output will be a+b+c+….(function calls with parameters) ?
  52. What will be the output of the below code:
let obj ={
a: 10,
vir : function(){
x();
console.log(this.a);
function x(){
console.log(this.a)
}
}
}
obj.vir();

Source:- JavaScript Interview Questions For 3 Years Of Experience

For more questions and answers visit our website at Frontend Interview Questions

--

--

Pravin M

I am a frontend developer with 10+ years of experience