1.

Name some array methods that were introduced in ES6.

Answer»
MethodsDescription
Array.from()It will convert iterable values and array-like values into arrays.
Array.of()It will create a new array instance from a variable number of arguments no matter what the number or the type of arguments are.
Array.prototype.copyWithin()It will copy the portion of an array to a DIFFERENT place within the same array.
Array.prototype.find()It will find an element in an array, based on certain parameters that are passed into this method.
Array.prototype.findIndex()It will return the index of the first element of the GIVEN array that FULFILLS the given condition.
Array.prototype.entries()It will return an array ITERATOR object that can be used while looping through the keys and values of arrays.
Array.prototype.keys()It will return an array iterator object as well as the keys of the array.
Array.prototype.values()It will PROVIDE the value of each key.
Array.prototype.fill()It will fill the specific array elements with a static value.


Discussion

No Comment Found