let or const?
JavaScript
10 pts
let or const?
The starter code stops with TypeError: Assignment to constant variable. The team name never changes, but the number of goals does. Fix the program by choosing the right keyword for each variable: keep team a const and make goals a let. The output must be:
Massawa Stars scored 3 goals
Checklist
- Keep
teama constant. - Make
goalsa variable that can change. - Print the result line.
🔑 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.
