1/5
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Callback
a function passed as an argument to another functionwhich is invoked after the completion of another function's execution.
asynchronous
Functions running in parallel with other functions. A good example is JavaScript setTimeout()
passing function as an argument
When you pass a function as an argument, remember not to use parenthesis.
Two arguments of Promise.then()
Promise.then() takes two arguments, a callback for success and another for failure.
Both are optional, so you can add a callback for success or failure only.This allows for handling asynchronous operations in a more manageable way, enabling chaining of actions after the completion of a Promise.
XMLHttpRequest
is a built-in browser object (API) that allows JavaScript to make HTTP requests (like GET, POST, PUT, DELETE, etc.) to a server without doing a full page refresh. This is the core technology behind AJAX (Asynchronous JavaScript and XML), although nowadays it's more common to work with JSON than XML.