Interactive online courses HTML Academy
2026-03-09 14:05 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('Average traffic: ' + averageUsers); if (averageUsers > expectedUsers) { console.log('Traffic is amazing. Keep up the good work!'); } else { console.log('Traffic is so-so. You need to try harder.'); }

Thanks! We’ll fix everything at once!

Result

  1. In the next line after the thirdDayUsers variable, add fourthDayUsers variable with 1247value.
  2. Add the fourthDayUsers parameter after thirdDayUsers in the muffin.plot()command.
  3. Change average value calculation. Add fourthDayUsers as the last summand and change the divisor to 4.