- script.js
JavaScript
var usersByDay = [812, 1360, 657, 1247];
Result
Goalscompleted
- On the second line, log the length of
usersByDayto the console. - On the next line, log the last element of the array in the console:
usersByDay[usersByDay.length - 1]. - On the next line, log the third-to-last array element to the console, using square brackets and
length. - Now, in the first line, add the fifth element
1000to the arrayusersByDay, separated by a comma and make sure that the console log function is working correctly.
Comments