Computers and Technology, 21.09.2020 19:01, breonnabyers
Duke and North Carolina have a famous basketball rivalry dating back to 1920. The number of points each team has scored in head-to-head competition over five years is provided in the dukeScores and ncScores arrays. Ex: North Carolina won the first game 76-72 since dukeScores[0] is 72 and ncScores[0] is 76. Write a for loop that examines the dukeScores and ncScores arrays and places "D" in the winningTeam array if Duke won or "N" if North Carolina won, for every game. Ex: winningTeam[0] should be "N" because North Carolina won 76-72, and winningTeam[1] should be "D" because Duke won 74-73. Display the contents of the winningTeam array using a for-of loop. Write a forEach() loop that examines the winningTeam array and determines the longest streak of Duke wins. Display the longest streak to the console, which should be 4. To determine the longest streak, use two variables initialized to 0: streak and longestStreak. Loop through the winningTeam array. Every time a "D" appears, increment streak and then update longestStreak if streak > longestStreak. When an "N" is encountered, reset streak back to 0. When the loop terminates, longestStreak will contain the longest streak.
Answers: 3
Computers and Technology, 22.06.2019 22:30, kierafisher05
What is the most popular genre of video games?
Answers: 1
Computers and Technology, 23.06.2019 04:00, coolconnor1234p0sv4p
Another name for addicting games. com
Answers: 1
Duke and North Carolina have a famous basketball rivalry dating back to 1920. The number of points e...
Health, 09.03.2020 21:45
Mathematics, 09.03.2020 21:46
Mathematics, 09.03.2020 21:46
English, 09.03.2020 21:47