scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Solution - Count the Scrimba Students
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Solution - Count the Scrimba Students
AboutCommentsNotes
Solution - Count the Scrimba Students
Expand for more info
index.js
run
preview
console
/*
Alex from Scrimba wants to know how many new students have attended
Scrimba's weekly Town Hall event this year.

He has an array of first-time attendees for each month of the year.
Help him find the total number of attendees! Your function should
take in an array and return a number representing the total number
of new attendees.

Example input: [1,2,3]
Example output: 6
*/

const studentCount = [50,53,61,67,60,70,78,80,80,81,90,110];

function sumArray(arr){

}

console.log(sumArray(studentCount));
Console
undefined
,
/index.html
-1:48