HTML Academy
Summary of “Getting to know JavaScript”
Introduction to programming15/15
Back to the list of tasks
  • 1. Career start
  • 2. Making the program a bit more complicated
  • 3. Console log
  • 4. Data types
  • 5. Complex data types
  • 6. Unknown data
  • 7. Variables
  • 8. Declaring and assigning variables
  • 9. Operations
  • 10. Operations order
  • 11. A few more operations
  • 12. Release of Brekkie-meter v0.1, part 1
  • 13. Release of Brekkie-meter v0.1, part 2
  • 14. Summary of “Getting to know JavaScript”
  • 15. First program: MufFit v0.1
List of tasks
  • Sign up
  • Log in

Register to take up challenges

Registration will only take a minute and let you save your study progress. You can register with your email and password or login via social networks.

or
Log in and continue
  • script.js
JavaScript
/** * MufFit v0.1 * Author: @muffbot * License: CatoFree, NoDogs */ var foodInGrams = 100; var sleepInHours = 15; /* We store the weight of the food in the foodInGrams variable. The sleep time is stored in the sleepInHours variable. We will be saving integers to both variables. I will get 3 jumps for every 10 grams of the food I ate. For example: need to make 15 jumps for eating 50 grams of food. We’ll store the jumps count in the jumps variable. For every hour of sleep, I get 2 pull-ups. For example: I slept for 5 hours and now have to do 10 pull-ups. We’ll store the pull-ups count in the pulls variable. Each jump comes with a round of running, each pull-up, a half of a round. For example: you get 20 rounds around the room for 15 jumps and 10 pull-ups. We’ll store the runs count in the runs variable. */

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

Console

The code has changed, click “Run” or turn autorun on.

Result

Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

VISAMastercard

Log in

or

Forgot your password?

Sign up

Sign up

or
Log in

Restore access

Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

Forgot to connect your email to the profile? Email us and we’ll help.