We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6295674 + 57d054e commit fc373f5Copy full SHA for fc373f5
src/exercises/arrays/array-01.ts
@@ -1,2 +1,18 @@
1
// Introducing Arrays
2
const arrayInit: number[] = [1, 2, 3, 4];
3
+
4
+// insertion
5
+const array_insertion: number[] = [1, 2, 3, 4];
6
+array_insertion.push(5);
7
+array_insertion.push(7);
8
+array_insertion.push(2);
9
10
+// Deletion
11
+// This .pop() method removes the last-added element of the array.
12
+const array_deletion: number[] = [1, 2, 3, 4];
13
+array_deletion.pop();
14
15
16
+// This .shift() method will remove the first element and return it.
17
+array_deletion.shift();
18
0 commit comments