This code appears to be right - changevariables.js - exercise 4 of 6


#1

I'm having problems with the code in changevariables.js, even though the code appears to be right and is printing on the browser screen.

And this is how it appears in the browser:

Morning alarm is set to: 9:00AM

Did you set '6:30AM' as the morningAlarm variable's value?

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

#2

It might want a space after your colon like here.


#3

It's still doing it with the change:

Code:

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

Browser message:

Morning alarm is set to: 9:00AM

Error message still the same:

Did you set '6:30AM' as the morningAlarm variable's value?


#4

Morning alarm is set to should have an extra space.

Morning alarm is set to: 9.00AM


#5

I get the same error every time. I just reported it by "Report a bug" cause it must be a bug... Hope they fix it soon.


#6

Perhaps you got ahead of the code checker?


#7

Hey,

I got the same problem, and it's SO annoying, cs, is there a way to more forward?? Could I skip this exercice?

There is something wrong with their code.

Thank you SO much :slight_smile:


#8

It looks like they've fixed this issue. No more errors appear on this exercise. Try if you haven't done this yet, it works for me.


#9

Hey thank you so much :)!


#10

It's still doing this.

Code:

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

Output:

Morning alarm is set to: 9:00AM

Error message:

Did you set '6:30AM' as the morningAlarm variable's value?


#11

I just sent a bug report. Everything seems to be working properly. According to the instructions, I did set the var moringAlarm right. It changes the time and everything. But I continue to get that error message.


#12

The code work now:

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


#13

Still not working on mine.


#14

I've done everything I'm supposed to do, with input from you and the rest of the people responding here, and I still get the error message "did you set '6:30AM' as the morningAlarm variable's value. It's just not reading it right or there is a bug. I did send a report.


#15

Having the same problem as others here..


#16

Same here. Any fix CA?


#17

I know it might be silly, but have you done one step at a time? Like step 1, then check; step 2, then check; step 3, then check. This is the only way it worked for me.


#18

Thanks a lot. I finally got it to work, using the step-by-step system.


#19

helo friends, i am facing same problm ..in this segments. i did step by step , but still showing same error by saying that Did you set '6:30AM' as the morningAlarm variable's value? what should i do please help me anyone....i reported bug ,,but they didnt got any response yet


#21

I finally got it! Anybody who is having trouble:

Make sure that you are completing one step at a time, typically you don't have to do this, but at this particular point, this is the only way you'll get through. Here are some step by step instructions.

  1. Construct your first line of code on line one. It should be very simple and should just be the generic, var morningAlarm = '6:30AM';. Make sure that you run the editor after just this first step.

  2. This will get you step one completed, continue by constructing the second line of code on line two that is you setting morningAlarm equal to whichever time you chose. Remember to use a string and don't forget to include the semicolon at the end because of syntax.

  3. Lastly, just use the console.log function to print the string 'Morning alarm is set to: ', and also print morningAlarm. The function of this is to show you that you can overwrite the what the variable morningAlarm is set to.

I hope this helps! :smile: