0 items found for category Entertainment

Sort By View :

No Data Found

Loading...

Regular functions created using function declarations or expressions are constructible and callable. Since regular functions are constructible, they can be called using the new keyword. However, the arrow functions are only callable and not constructible, i.e arrow functions can never be used as constructor functions. Hence, they can never be invoked with the new keyword.
"this" value inside a regular function is dynamic and depends on the invocation. But "this" inside the arrow function is bound lexically and equals to this of the outer function.

The main difference between forEach and filter is that forEach just loop over the array and executes the callback but filter executes the callback and check its return value.Map like filter & foreach takes a callback and run it against every element on the array but whats makes it unique is it generate a new array based on your existing array.Map ran through every element of the array, multiplied it to 10 and returned the element which will be going to store inside our resulting array.
The find() method is used to find all the descendant elements of the selected element. It finds the element in the DOM tree by traversing through the root to leaf. The filter() method is used to filters all the elements and returns the element that matches and the element that do not match are removed.

Template strings are a powerful feature of modern JavaScript released in ES6. It lets us insert/interpolate variables and expressions into strings without needing to concatenate like in older versions of JavaScript.

The scope of a var variable is functional scope. The scope of a let variable is block scope. The scope of a const variable is block scope.
It can be updated and re-declared into the scope. It can be updated but cannot be re-declared into the scope. It cannot be updated or re-declared into the scope.
It can be declared without initialization. It can be declared without initialization. It cannot be declared without initialization.
It can be accessed without initialization as its default value is “undefined”. It cannot be accessed without initialization otherwise it will give ‘referenceError’. It cannot be accessed without initialization, as it cannot be declared without initialization.