- script.js
JavaScript
var usersByDay = [812, 1360, 657, 1247];
Result
Goalscompleted
- On the second line, log
usersByDay
array length in 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 from the end array element in the console using square brackets and
length
. - Now, in the first line, add the fifth element
1000
to the arrayusersByDay
, separated by a comma and make sure that the console log function is working correctly.
Comments