Trip Budget with const Only
JavaScript
20 pts
Trip Budget with const Only
Class 8B plans a trip to Massawa. Write the budget using only const (no let, no var):
busFare= 40,lunch= 35,students= 20perStudent= bus fare plus lunchtotal=perStudenttimesstudents
Print exactly:
Per student: 75 Nakfa Total: 1500 Nakfa
Calculate with the variable names; do not type 75 or 1500.
Checklist
- Create the three starting constants.
- Calculate
perStudentandtotalfrom the other constants. - Use only
const. - Print the two budget lines.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
