Skip to content
- Describe event bubbling.
- Describe event capturing.
- What is the difference between an “attribute” and a “property”?
- Explain the same-origin policy with regards to JavaScript.
- What is the difference between event.target and event.currentTarget?
- What is the difference between event.preventDefault() and event.stopPropagation()?
- What is the DOM?
- How do you select elements with Vanilla JavaScript?
- Explain event delegation in JavaScript.
- what is the purpose of the addEventListener method?
- How do you create and remove elements in the DOM?
- Explain the concept of event propagation.
- How can you prevent the default behaviour of an event?
- What is the purpose of the data- attribute in HTML?
- Describe the difference between innerHTML and textContent.
- How do you handle asynchronous code in JavaScript?
Micelleneous
- What language constructions do you use for iterating over object properties and array items?
- What are the pros and cons of extending built-in JavaScript objects?
- What is the difference between == and ===?
- Why is it called a Ternary operator, what does the word “Ternary” indicate?
- What is strict mode? What are some of the advantages/disadvantages of using it?
- What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?
- What tools and techniques do you use debugging JavaScript code?
- Explain the difference between mutable and immutable objects.
- What is an example of an immutable object in JavaScript?
- What are the pros and cons of immutability?
- How can you achieve immutability in your own code?
- Explain the difference between synchronous and asynchronous functions.
- What is event loop?
- What is the difference between call stack and task queue?
- What are the differences between variables created using let, var or const?
- Can you change a property of an object defined via const? How you can change this behavior?
- What are the differences between ES6 class and ES5 function constructors?
- Can you offer a use case for the new arrow => function syntax? How does this new syntax differ from other functions?
- What advantage is there for using the arrow syntax for a method in a constructor?
- What is the definition of a higher-order function?
- Can you give an example for destructuring an object or an array?
- Can you give an example of generating a string with ES6 Template Literals?
- Can you give an example of a curry function and why this syntax offers an advantage?
- What are the benefits of using spread syntax and how is it different from rest syntax?
- How can you share code between files?
- Why you might want to create static class members?
- What is the difference between while and do-while loops in JavaScript?
- What is a promise? Where and how would you use promise?
- Discuss how you might use Object Oriented Programming principles when coding with JavaScript.
TOP - 30 Indian Trivia Questions
1-10: Basics of JavaScript
- What is JavaScript?
- Explain the difference between let, const, and var.
- How does hoisting work in JavaScript?
- Describe the concept of closures.
- Explain the event loop in JavaScript.
- What is the difference between == and ===?
- How do you check the type of a variable in JavaScript?
- What is the use of the this keyword in JavaScript?
- Explain the difference between function declaration and function expression.
- How does the setTimeout function work?
11-20: Functions and Scope
- What is a callback function?
- Explain the concept of a pure function.
- Describe the differences between function.call, function.apply, and function.bind.
- What is the purpose of the arguments object in a funct
- How do you create a closure in JavaScript?
- What is the use of the bind method?
- What is the difference between a shallow copy and a deep сору?
- How does the call stack work in JavaScript?
- Explain the concept of function currying.
- How can you avoid callback hell in JavaScript?
21-30: Objects and Prototypes
- What is prototypal inheritance?
- How do you create an object in JavaScript?
- What is the purpose of the prototype property in Javas
- Explain the difference between Object.create and the constructor pattern.25. How do you add a property to an object in JavaScript?
- What is the hasOwnProperty method used for?
- How can you prevent modification of object properties in JavaScript?
- Describe the use of the new keyword.
- Explain the concept of Object Destructuring in JavaScript.
- What is the difference between null and undefined?