Skip to content

Commit 1417c6e

Browse files
author
Siyuan Gao
authored
Create exercise_03.js
1 parent 0cd0dc3 commit 1417c6e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Lesson07/exercise_03.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
let foods = [];
2+
3+
foods.push('burger');
4+
foods.push('fries');
5+
foods.push('wings');
6+
7+
console.log(foods.indexOf('burger'));
8+
9+
console.log(foods.length);
10+
11+
let position = foods.indexOf('burger');
12+
foods.splice(position, 1);
13+
14+
console.log(foods);

0 commit comments

Comments
 (0)