An Overview of Array Methods in JavaScript

Learn about how to manipulate arrays in JavaScript Image by Paweล‚ Czerwiล„ski fromย Unsplash Letโ€™s create an array: var numbers = [1,2,3,4,5] Array elements are accessed using an index. The index starts from 0ย . So if we want to access the first element, then we need to access using index 0. numbers[0] // 1 numbers[3] // …

Different ways and correct way to delete an array .

Learn about what is the right way to delete an array in Javascript. Letโ€™s create an Array let array = [1,2,3,4,5]; First way to delete an array isย , referencing to a new empty array array = []; Letโ€™s look an example var array1 = [1,2,3,4,5]; var array2 = array1; array1[0] = 100; array2[0]; //100 because …

Create your own website, free on WordPress.com.Create your own website.
Start free