Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 2b27bce

Browse files
End of Homework 2
1 parent f5a2999 commit 2b27bce

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use strict'
2+
let drinkTray = [];
3+
const drinkTypes = [ "cola" , "limonade" , "eau" ];
4+
let y=1 ;
5+
drinkTypes.forEach(function(element){
6+
let x=1;
7+
do{
8+
drinkTray.push(element); x++; y++;
9+
}while((x<=2) && (y<5));
10+
});
11+
let drinkGay="Hey guys, I brought a "; y=1;
12+
drinkTray.forEach(function(element){
13+
if (y<drinkTray.length){
14+
drinkGay+=element+", a "; y++;
15+
}else{ drinkGay+=element}
16+
});
17+
console.log(drinkGay)

0 commit comments

Comments
 (0)