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

JavaScript

var milkInGrams = 50;

Thanks! We’ll fix everything at once!

Result

  1. Calculate the caloric value of Muffin’s breakfast. To do this, save the result of the milkInGrams * (42 / 100) expression in variable breakfastCalories
  2. and then log breakfastCalories variable in the console.
  3. Find out how many grams of food Muffin can eat for lunch and dinner if his daily limit is 500 calories. In order to do that, save the result of the (500 - breakfastCalories) / 4 expression to the dryFeedInGrams variable (1 gram of food contains around 4 calories).
  4. Output the dryFeedInGrams variable to the console.