- 2

please help

Fill in the blanks to calculate the sum of all elements of the array called "num" and output the result to the console. num = [8, 7, 44, 3, 21]; let sum = 0; (let i=0;i<5;i++) { sum += [i]; } .log(

9th Oct 2022, 12:06 PM
mesuli mkhize
mesuli mkhize - avatar
2 Answers
+ 1
have you tried this in code-playground? If not try hint : you can access array like num[0] is 8 same as num[i] when i is 0
9th Oct 2022, 12:15 PM
Daljeet Singh
Daljeet Singh - avatar
0
The exercises are intended for you to practice and consolidate the lessons. If someone else does them for you, what are you doing the course for?
10th Oct 2022, 12:32 AM
Emerson Prado
Emerson Prado - avatar