- 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);
Result
Goalscompleted
Calculate the average site traffic.
- Add declaration of the variable
averageUsers
to the end of the program. - And assign it a value calculated using the formula
(firstDayUsers + secondDayUsers + thirdDayUsers) / 3
. - Then log the variable
averageUsers
in the console.
Comments