Skip to content

Commit 58d35b4

Browse files
committed
recrusive
1 parent 729cb54 commit 58d35b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

script.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,18 @@ const mashPotatoes = [
3939
// addFood(steak[i], '#steak')
4040
// }
4141

42-
//Iteration 1 using callbacks -- Try to streamline with for loops
42+
//Iteration 1 using callbacks -- Try to streamline with recursion
4343
addFood(steak[0], '#steak', function(){
4444
addFood(steak[1], '#steak', function(){
4545

4646
})
4747
})
4848

4949

50-
//Iteration 2 using then
50+
//Iteration 2 using then -- Try to streamline with recursion
5151
addFood(mashPotatoes[0], '#mashPotatoes').then(res => {
5252
addFood(mashPotatoes[1], '#mashPotatoes').then(res => {
53+
5354
})
5455
})
5556

0 commit comments

Comments
 (0)