Karteikarten
Advanced
Karten in diesem Stapel (15)
- 1What is an IIFE in JavaScript?An Immediately Invoked Function Expression is a function that runs as soon as it is defined.
- 2What is 'hoisting' in JavaScript?Hoisting is JavaScript's behavior of moving declarations to the top of the current scope.
- 3Explain the difference between 'call', 'apply', and 'bind'?'call' and 'apply' invoke a function with a specified context, 'apply' uses an array of arguments, 'bind' creates a new function with a specified context.
- 4What is a JavaScript closure?A closure is a function that has access to its outer function's scope even after the outer function has returned.
- 5What is 'event delegation' in JavaScript?Event delegation is a technique where a single event listener is used to manage events on multiple child elements.
- 6How does 'async/await' work in JavaScript?'async/await' is used to handle asynchronous code in a synchronous manner, 'await' pauses the execution until the promise is resolved.
- 7What is a 'Promise' in JavaScript?A Promise is an object representing the eventual completion or failure of an asynchronous operation.
- 8Explain the concept of 'prototypal inheritance'Prototypal inheritance is a feature in JavaScript where objects inherit properties and methods from other objects.
- 9How do you deep clone an object in JavaScript?Using JSON.parse(JSON.stringify(obj)) or structuredClone(obj) for deep cloning.
- 10What is 'debouncing' in JavaScript?Debouncing is a technique to limit the rate at which a function executes, typically used with events like scrolling or resizing.
- 11What is 'throttling' in JavaScript?Throttling is a technique that ensures a function is only called at most once in a specified time period.
- 12How can you create a private variable in JavaScript?Using closures or by defining variables within a function scope.
- 13What is the 'spread operator' in JavaScript?The spread operator (...) allows an iterable to expand in places where multiple arguments are expected.
- 14What is the difference between 'null' and 'undefined'?'null' is an assigned value meaning 'no value', while 'undefined' means a variable has been declared but not assigned a value.
- 15What is 'destructuring' in JavaScript?Destructuring is a syntax that allows you to unpack values from arrays or properties from objects into distinct variables.
Informationen
- Beschreibung
- Beginner JavaScript Karteikarten am Advanced, erstellt von Kenneth Crabtree am 09/11/2024.
- Erstellt von
- Kenneth Crabtree
- Aufrufe
- 2
- Bewertung