What the is point of changing a variable after you declared it?


If I set a variable to:

var morningAlarm = “6:30 AM”

and then add:

morningAlarm = “9:30 AM”

instead, whats the point of declaring my original morningAlarm variable to “6:30 AM”, why didn’t I just change it “9:30 AM”?


the concept of updating variable need to be taught, now we could do something very complicated where updating variables is a must because there is no other way, but this will be very confusing

updating variable is very useful. You will see later


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.