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