|
@@ -1,13 +1,10 @@
|
|
let calories =
|
|
let calories =
|
|
- prompt("How many calories do you eat for breakfast?", 700) +
|
|
|
|
- prompt("How many calories do you eat for lunch?", 500) +
|
|
|
|
- prompt("How many calories do you eat for dinner?", 500);
|
|
|
|
-alert("you eat $`{calories}` for breakfast");
|
|
|
|
|
|
+ +prompt("How many calories do you eat for breakfast?", 700) +
|
|
|
|
+ +prompt("How many calories do you eat for lunch?", 500) +
|
|
|
|
+ +prompt("How many calories do you eat for dinner?", 500);
|
|
|
|
+alert(`you eat ${calories} for breakfast`);
|
|
|
|
|
|
-// let calories2 = prompt("How many calories do you eat for lunch?", 500);
|
|
|
|
-// alert("you eat ${calories2} calories for breakfast");
|
|
|
|
-// let calories3 = prompt("How many calories do you eat for dinner?", 500);
|
|
|
|
-// alert("you eat ${calories3} calories for breakfast");
|
|
|
|
-// let result = (${ calories1 } + ${ calories2 } + ${ calories3 });
|
|
|
|
|
|
+let message = "you are eating enough calories";
|
|
|
|
+if (calories >= 1800) message = "you are eating too many calories";
|
|
|
|
|
|
-// alert(result);
|
|
|
|
|
|
+alert(message);
|