Stupid question maybe?


#1

https://www.codecademy.com/courses/learn-javascript/lessons/variables/exercises/change-a-variable?action=lesson_resume&link_content_target=interstitial_lesson

There is not a problem with my code... i simply cannot understand why i need to write the second line "morningAlarm = '7:30AM'; If i can change the time inside the.... var morningAlarm = '6:30AM';
This is probably a stupid question but any guidance would be greatly appreciated!

var morningAlarm = '6:30AM';
morningAlarm = '7:30AM';
console.log('Morning alarm is set to:', morningAlarm);

#2

this exercise teaches you how to update variable, which is very important.

Yes, you can do this directly, but this about teaching a concept, which i guarantee you will use later


#3

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