Now I have a tendency to change goals throughout the year. If I want to keep a goal flexible, I want to declare it using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var">var</a>
or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let">let</a>
.
var goal1 = 'Lose weight';
let goal2 = 'Ride bike more';
// Then if I change my mind later in the year...
goal1 = 'Keep weight the same';
However, if I want a goal to be constant throughout the year, I want to declare it using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const">const</a>
:
const goal3 = 'Write more';
// Then if I change my mind later, I can't change the goal to something else...
const goal3 = 'Watch more Mandalorian';
// This will produce an error.