Skip to content

Commit c80da52

Browse files
committed
part1arraysExercise
1 parent 67a65d2 commit c80da52

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

arrays/exercises/part-one-arrays.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
//Create an array called practiceFile with the following entry: 273.15
2-
2+
let practiceFile = [273.15];
33
//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.
4-
4+
practiceFile.push(42);
5+
console.log(practiceFile);
6+
practiceFile.push('hello');
7+
console.log(practiceFile);
58
//Use a single .push() to add the following items: false, -4.6, and "87". Print the array to confirm the changes.
9+
practiceFile.push('false', -4.6, "87");
10+
console.log(practiceFile);

0 commit comments

Comments
 (0)