Loading...
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.
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.
The forEach() method does not create a new array based on the given array. The map()
method creates an entirely new array. The forEach() method returns “undefined“. The
map() method returns the newly created array according to the provided callback
function.
The find() method returns the first value that matches from the collection. Once it matches the value in findings, it will not check the remaining values in the array collection. The filter() method returns the matched values in an array from the collection.
The find() method returns the first value that matches from the collection. Once it matches the value in findings, it will not check the remaining values in the array collection. The filter() method returns the matched values in an array from the collection.
Template literals provide an easy way to interpolate variables and expressions into
strings. The method is called string interpolation.