The destructuring assignment syntax unpacks the values from the array into distinct variables. In other words, modify the existing array instead of creating a new array with the first n elements.Ĭode var myArray = Ĭonsole.log(myArray) // Using Destructuring Use this method when you want to retain the first n elements in the existing array and remove the other elements from the array.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |