- script.js
JavaScript
var usersByDay = [812, 1360, 657, 1247];
Result
Goalscompleted
Let’s get the values from the array.
- After the array, declare variable
firstDayUsers
and write into it the first element of the array:usersByDay[0]
. - On the next line, log variable
firstDayUsers
in the console. - On the next line, declare a variable
fourthDayUsers
and write into it the fourth element of the array:usersByDay[3]
. - On the next line, log variable
fourthDayUsers
in the console.
Comments