Skip to content

Commit 9451242

Browse files
authored
Added expected output for methods unshift and push
Array methods example for unshift and push doesn't show expected output which is helpful for someone to see exactly what happens to the array and reinforces the descriptions of these methods
1 parent b525f36 commit 9451242

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/lesson2/tutorial.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ var animals = ['dog', 'cat', 'rabbit', 'horse', 'elephant', 'monkey'];
310310
animals.unshift('cow');
311311
animals.push('zebra');
312312

313-
console.log(animals);
313+
console.log(animals);
314+
315+
// Expected output: ['cow', 'dog', 'cat', 'rabbit', 'horse', 'elephant', 'monkey', 'zebra']
314316
```
315317

316318
#### Removing objects

0 commit comments

Comments
 (0)