1+ // Array(5)
2+
3+ // let listOfAnimals = ["Cat", "Dog", "Bird", "Fox", "Wolf"];
4+ // console.log(listOfAnimals[1]);
5+
6+ // let listOfNumbers = [1, 4, 6, 8, 2, 536, 35, 43];
7+ // let listOfBooleans = [true, false, true, true];
8+ // let listOfObj = [
9+ // {
10+ // name: "amin",
11+ // age: "19",
12+ // },
13+ // { name: "mahdi" },
14+ // { name: "yasin" },
15+ // { name: "erfan" },
16+ // ];
17+
18+ // // console.log(listOfObj[2])
19+ // let listOfArray = [
20+ // [12, 1413, 421],
21+ // ["g", "h", "y"],
22+ // [true, {}, "5", 75],
23+ // ];
24+
25+ // console.log(listOfArray[0][2]);
26+
27+ // let listOfFunctions = [function work1() {}, function work2() {}];
28+
29+ // let arrayList = [
30+ // ["w0", "w1", " w2 "],
31+ // ["w3", "w4", "w5", ["8", 9, 7]],
32+ // ["w6", "w7", ["hello ", "good bye"], "w8"],
33+ // ["w16", "w2", "w45"],
34+ // ];
35+
36+ // console.log(arrayList[2][2][0] + arrayList[1][3][0] + arrayList[0][2] + arrayList[2][2][1]);
37+
38+
39+ let listOfAnimals = [ "Cat" , "Dog" , "Bird" , "Rhino" , "Wolf" ] ;
40+
41+ // console.log("All animals:", listOfAnimals)
42+ // listOfAnimals.shift()
43+ // console.log("Remove first el:",listOfAnimals)
44+ // listOfAnimals.pop()
45+ // console.log("Remove last el:",listOfAnimals)
46+ // listOfAnimals.push("Bird")
47+ // console.log("add el:",listOfAnimals)
48+
49+ let newListOfAnimals = listOfAnimals . concat ( [ "snake" , "Fox" ] )
50+ console . log ( "newListOfAnimals" , newListOfAnimals )
51+
52+ console . log ( newListOfAnimals . indexOf ( "wewbetgrnhf" ) )
53+
54+
55+ listOfAnimals . sort ( )
56+ console . log ( "sorted list:" , listOfAnimals )
0 commit comments