1)Destructuring:
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.
let a, b, rest;
[a, b] = [10, 20];
console.log(a);
// Expected output: 10
console.log(b);
// Expected output: 20
[a, b, ...rest] = [10, 20, 30, 40, 50]
console.log(rest);
// Expected output: Array [30, 40, 50]
2)Const:
The const keyword was introduced in ES6 (2015).
Variables defined with const cannot be Redeclared.
Variables defined with const cannot be Reassigned.
Variables defined with const have Block Scope.
But you can NOT reassign the array:
Example
const cars = ["Saab", "Volvo", "BMW"];
cars = ["Toyota", "Volvo", "Audi"];
const car = {type:"Fiat", model:"500", color:"white"};
car = {type:"Volvo", model:"EX60", color:"red"};
Try it Yourself »3)Callback:
A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
4)next:
next() is called when you want the routing for this request to continue onto the next middleware or the next route handler for this request. It is common to have more than one middleware that might examine a given request so if you did not send a response and want normal routing to continue for this request, then you would call next() when you were done with your processing and you want routing to continue.
If you have already sent a response and thus do not want routing to continue, then you do not call next().
5)Asynchronous programming is a technique that enables your program to start a potentially long-running task and still be able to be responsive to other events while that task runs, rather than having to wait until that task has finished. Once that task has finished, your program is presented with the result.
6)Every object in JavaScript has a built-in property, which is called its prototype. The prototype is itself an object, so the prototype will have its own prototype, making what's called a prototype chain. The chain ends when we reach a prototype that has null for its own prototype.
7)Timeout in queue,dead queue,aws clouds watch and log groups
Comments
Post a Comment