- script.js
JavaScript
var days = 9; // Days in a period
var evenDayAmount = 200; // Amount of protein on even days
var oddDayAmount = 100; // Amount of protein on odd days
var total = 0; // Total amount of protein
/* Technical assignment
Meow! The program should calculate how much protein I need to drink for the entire training period.
On even days, I drink 200 grams. On odd days 100 grams.
The number of days is stored in variable days, the amount of protein to consume on an even day in variable evenDayAmount, protein on an odd day in variable oddDayAmount, and the result must be written into variable total, which is already defined.
*/