Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df971c3

Browse files
authored
Update 5-who-wants-a-drink.js
1 parent 7fe9d91 commit df971c3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Week1/practice-exercises/5-who-wants-a-drink.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,14 @@
88
*/
99

1010
// There are 3 different types of drinks:
11-
const drinkTypes = ['cola', 'lemonade', 'water'];
11+
const drinkTypes = ['cola', 'lemonade', 'water'];
12+
13+
let drinkTray = [];
14+
const loops = 5;
15+
16+
while(loops < 5){
17+
let drinkType = drinkTypes[Math.floor(Math.random()*3)];
18+
// not completed yet
19+
loops.unshift(drinkType);
20+
loops++;
21+
}

0 commit comments

Comments
 (0)