Skip to content

Commit e9b007b

Browse files
committed
part 1 done
1 parent c98b7ea commit e9b007b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arrays/exercises/part-one-arrays.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
//Create an array called practiceFile with the following entry: 273.15
22

3+
practiceFile = [273.15];
4+
35
//Use the bracket notation method to add "42" and "hello" to the array. Add these new items one at a time. Print the array after each step to confirm the changes.
6+
practiceFile[1] = 42;
7+
console.log(practiceFile);
8+
9+
practiceFile[2] = "hello";
10+
console.log(practiceFile);
411

512
//Use a single .push() to add the following items: false, -4.6, and "87". Print the array to confirm the changes.
13+
14+
practiceFile.push(false, -4.6, "87");
15+
console.log(practiceFile);

0 commit comments

Comments
 (0)