Top 100 JavaScript Interview Questions
JavaScript Interview Questions For Freshers
- What are the data types in JavaScript ?
- What is an object in JavaScript ?
- In how many ways we can define an object in JavaScript ?
- How to define a class in JavaScript ?
- What is defineProperty() method of javascript Object ?
- What is scope in JavaScript ?
- Explain variable hoisting ?
- Explain closures in javascript ?
- Difference between null and undefined ?
- Difference between == and === ?
- What are the new features in ES6 , which were not there in previous JavaScript version ?
- Explain time complexity ?
- What is space complexity ?
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();
- What will be the output of the below code for (var i= 0; i < 5; i++){ setTimeout(() => console.log(i)); }
- What will be the output of the below code :- var a = 90; doit(); function doit(){ console.log(a); var a = 10; }
- Explain call(), bind() and apply() in JavaScript ?
- Advantage of using arrow functions ?
- What is webpack and babel ?
- How can we add an element at the start of a JavaScript array ?
- How to capitalise all the first letters of a given string ?
- What will be the output of below code snippet :-function x() {return 2}alert(x());function x() {return 3}
- What will be output of following code doit(); var doit = function (){ alert('x'); }
- Difference between pass by value and pass by reference ?
- What will be the output of following code:- for (var i= 0; i < 5; i++){ (function(i) { setTimeout( () => console.log(i)) })(i); }
- What is InstanceOf operator ?
- What is the use of constructor() in a class ?
- What will be the output of the following :
console.log(4.toString());
console.log(4.2.toString());
console.log(4*undefined); - How can we use javascript Set to remove duplicate elements of an array ?
- What is the data storage limit of a cookie ? and what is the maximum number of characters that can be stored in a cookie string ?
- How to make deep copy and shallow copy of objects ?
- What's the difference between for loop and for each loop ?
- What is a unary function ?
- What is JSON in javascript and what are its advantages ?
- What is JSON.stringify() ?
- What is JSON.parse() ?
Source:- JavaScript Developer Interview Questions for Freshers
JavaScript Interview Questions For Experienced
- What is Callback hell ?
- Explain promises in JavaScript ?
- Difference between observable and a promise
- How to create custom events in JavaScript ?
- Difference between prototype and _proto_ ?
- Explain prototypal inheritance in JavaScript ?
Difference between for in and for of loop ?
- Difference between get and post methods ?
- Difference between post and put methods ?
- When we pass an object to a function are they passed by reference or by value ?
- What do u understand by the terms mutable and immutable in JavaScript ?
- What is Async and Await in JavaScript ?
- Is array a data type ?
- How can we overwrite any JavaScript inbuilt property (like array.push())
- Explain exception handling in JavaScript ?
- Difference between a transpiler and a compiler ?
- How to check if a number is an integer without using math function and without converting number into string or array ?
- Use of JavaScript clearInterval() ?
- How to define a private method or variable inside a class in JavaScript or ES6 ?
- Can arrow functions be used as constructor functions ?
- What is Map in JavaScript ?
- How to implement authentication in a website ?
- How would you implement pagination using JavaScript ?
- Difference between a browser tab and a window in context of localstorage and sessionstorage ?
- What is oauth in context of jwt ?
- What is nginx used for ?
- How to change the redirection URLs after the build has been made ?
- What is a JWT , what are it's parts and what is its use ?
- What are ‘set’ in javascript ?
- Do we have reverse() method on javascript string ?
- Name some array methods in JavaScript ?
- Which operation is faster among == and === ?
- Explain Array's sort method for sorting numbers. What is the time complexity of this method ?
- What is Micro frontend architecture ?
- What is the difference between first class function and higher order function ?
- What is temporal dead zone ?
- Difference between put and patch method in javascript ?
- How to convert an object to an Array in JavaScript ?
- What is memoization in JavaScript ?
- How to write a function ‘Sum’ such that on calling sum(a)(b)(c)....() where a,b,c etc are numbers , the output will be a+b+c+....(function calls with parameters) ?
- What are the design patterns in JavaScript ?
- What is event loop in JavaScript ?
- How to deep clone in JavaScript ?
- How to flatten an array in JavaScript ?
- What is debounce in JavaScript ?
- Write a code to flatten the contents of an object ?
- How to create virtual dom in JavaScript ?
- What is critical rendering path ?
- What is a freeze method in JavaScript ?
- What are solid principles in JavaScript ?
- What is the seal method in JavaScript ?
- Difference between Angular and React ?
- How to watch variable changes in JavaScript ?
- How to create a change detection mechanism of JavaScript framework ?
- What is functional programming in JavaScript ?
- What is the use of function currying in JavaScript ?
- What is quick sort and what is it’s time complexity ?
- Explain bubble sort and insertion sort with example ?
- What is a REST API ?
- How to apply conditional breakpoints in chrome browser debugging tool ?
- 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 ?
- What is an execution context and lexical environment in JavaScript ?
- What is generator function in JavaScript ?
- What are JavaScript iterators ?
For more questions and answers visit our website at frontend interview questions
Comments
Post a Comment