Keep a greeting fixed while changing a score. The Console will show both the intermediate values and the finished message.
In this exercise you will declare variables using const and let following best practices. Remember:
const for values that should not be reassigned.let for values that will change.A different counter shows why the label stays fixed while a value changes:
const station = "Harbor";
let visitors = 3;
visitors += 2;
console.log(`${station}: ${visitors}`); // Harbor: 5
const greeting to "Hello, JavaScript!"; the provided probe will show greeting: Hello, JavaScript!.let score to 0; its probe will show initial score: 0.score with += 10; the provided probe will show score: 10.Hello, JavaScript! Score: 10 using both variables.Use const when the value should not change, let when it will.
Declare greeting with const since it's a fixed message.
Use let for score because you will increment it.