1const array = [1,2,3,4,5];
2const firstElement = array.shift();
3
4// array -> [2,3,4,5]
5// firstElement -> 1
1let array = ["a", "b", "c", "d", "e"];
2
3// Both first1 and first2 have the same value.
4let [first1] = array;
5let first2 = array[0];
1let mylist = ['one','two','three','last']
2mylist[0],mylist[1],mylist[2],mylist[3]//this is called indexing and slicing in python
3//in javascript it called getting elements in array