Interactive online courses HTML Academy
2026-03-09 10:46 Diff
  • script.js

JavaScript

var usersByDay = [812, 1360, 657, 1247];

Thanks! We’ll fix everything at once!

Result

  1. On the second line, log usersByDay array length in the console.
  2. On the next line, log the last element of the array in the console: usersByDay[usersByDay.length - 1].
  3. On the next line, log the third from the end array element in the console using square brackets and length.
  4. Now, in the first line, add the fifth element 1000 to the array usersByDay, separated by a comma and make sure that the console log function is working correctly.