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

JavaScript

console.log('Brekkie-meter v0.1 is launched'); var milkInGrams = muffin.ask('Boss, how many grams of milk have you had?'); console.log('Brekkie-meter has received milk data. ' + milkInGrams + ' grams consumed.');

Thanks! We’ll fix everything at once!

Result

  1. Declare variable breakfastCalories,
  2. use it to save the result calculated with the formula described in the theory section.
  3. Log in the console a message made up of three fragments: string 'Calorific value of breakfast: ', variable breakfastCalories, line ' calories, boss!'.