Interactive online courses HTML Academy
2026-03-09 14:07 Diff
  • script.js

JavaScript

var expectedUsers = 1000; var firstDayUsers = 812; var secondDayUsers = 1360; var thirdDayUsers = 657; // Drawing the traffic graph muffin.plot(firstDayUsers, secondDayUsers, thirdDayUsers, expectedUsers); // Calculating the average traffic value var averageUsers = (firstDayUsers + secondDayUsers + thirdDayUsers) / 3; console.log(averageUsers);

Thanks! We’ll fix everything at once!

Result

Complete the program.

  1. Add a hint to the average value log in the console: 'Average traffic: ' + averageUsers.
  2. At the end of the program, add a check to make sure that the average value is greater than the expected one.
  3. If the condition is met, log the message in the console 'Traffic is amazing. Keep up the good work!'.
  4. Otherwise, log the following message in the console 'Traffic is so-so. You need to work harder!'.