What is the significance of the async keyword in JavaScript?
- It defines a function that returns a Promise, allowing asynchronous operations.
- It makes a function execute synchronously.
- It is used to declare a variable as asynchronous.
- It enables the use of callbacks.
The async keyword is used to define a function as asynchronous, meaning it returns a Promise. This allows you to perform non-blocking operations, making JavaScript code more efficient.
Loading...
Related Quiz
- Which of the following is a suitable method to prevent variable leakage in the global scope?
- In semantic versioning, what does a change in the 'patch' version (e.g. 1.2.3) typically indicate?
- When a JavaScript function is executed, a new execution context is created, and a special object called ________ is created.
- You are tasked with developing a system to read and process large files without consuming a lot of memory. How would you utilize streams in Node.js to efficiently read, process, and write the data?
- Which command is used to install Express in your Node.js project?