Javascript Timetable
Javascript Timetable
- **DOM Manipulation**
#### 7:00 AM - 10:00 AM (3 hours)
- **Dinner Break**
#### 10:00 AM - 1:00 PM (3 hours)
- Error handling
### Day 3: June 19th #### 5:00 PM - 8:00 PM (3 hours)
- **Dinner Break**
#### 10:00 AM - 1:00 PM (3 hours)
- **Break**
Here are some common JavaScript interview
questions along with concise answers:
#### 2:00 PM - 5:00 PM (3 hours)
8. **What is the difference between `==` and 14. **How do you select elements in the
`===`?** DOM?**
- `==` checks for value equality with type - Using methods like `getElementById`,
coercion, while `===` checks for value and type `getElementsByClassName`,
equality. `getElementsByTagName`, `querySelector`, and
`querySelectorAll`.
15. **What are higher-order functions?**
- Higher-order functions are functions that 21. **What are modules in JavaScript?**
can take other functions as arguments or return
them as results. - Modules are reusable pieces of code that
can be imported and exported between files
using `import` and `export` statements.
- Destructuring is a syntax that allows you to 25. **What are `Map` and `Set` objects?**
unpack values from arrays or properties from
objects into distinct variables. - `Map` is a collection of key-value pairs, and
`Set` is a collection of unique values.
- A debounce function limits the rate at which 45. **What is the `Fetch API`?**
a function can fire, ensuring it is not called again
- The Fetch API provides an interface for
until a certain amount of time has passed.
fetching resources (e.g., across the network),
simpler and more powerful than
`XMLHttpRequest`.
40. **What is a throttle function?**
- The spread syntax allows an iterable such as - `Object.assign` copies enumerable own
an array or string to be expanded in places properties from one or more source objects to a
where zero or more arguments (for function target object, and returns the target object.
calls) or elements (for array literals) are
expected.
65. **What are template strings (template
literals)?**
60. **What is the `rest` parameter?**
- Template strings, or template literals, are
- The rest parameter syntax allows us to string literals that allow embedded expressions,
represent an indefinite number of arguments as using backticks (`` ` ``) and `${}` syntax.
an array.
- Destructuring assignment is a syntax that - `Array.map` returns a new array with the
allows extracting values from arrays or results of calling a provided function on every
properties from objects into distinct variables. element, while `Array.forEach` executes a
provided function once for each array element
but does not return anything.
69. **What is the difference between 74. **What is the `Reflect` API?**
`Array.filter` and `Array.find`?**
- The `Reflect` API provides methods for
- `Array.filter` returns a new array with all interceptable JavaScript operations, similar to
elements that pass the test implemented by the most of the methods on the `Proxy` handler
provided function, while `Array.find` returns the object, but also includes some methods not
value of the first element that satisfies the specific to proxies.
provided testing function.
- The `Proxy` object is used to define custom 78. **What is a JavaScript engine?**
behavior for fundamental operations like
property lookup, assignment, enumeration, - A JavaScript engine is a program or
function invocation, etc. interpreter that executes JavaScript code, such
as V8 (Chrome, Node.js), SpiderMonkey
(Firefox), or JavaScriptCore (Safari).
79. **What is `Event.preventDefault`?** 85. **What is `Object.entries`?**