Tell us what’s happening:
I re-read the directions multiple times to see if I missed anything, watched the video, and stared at the hint/guide on the site. However, after everything I’ve tried it still won’t allow me to complete the lesson (by that I mean when I click ctrl + enter it doesn’t run the test or tell me if I did something incorrectly). Below I’ve copied the exact code from the video (I only changed the names). I also attempted to establish the variables first and then use an assignment operator separately but that didn’t help either. If anyone sees anything I need to change/fix please let me know, thank you so much (it’s been VERY frustrating).
myFirstName = “robin”;
Your code so far
var myFirstName = "robin";
var myLastName = "turner";
Your browser information:
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0
Challenge: Declare String Variables
Link to the challenge:
With this code I was able to pass the challenge.
Are you clicking the “Run the Tests” with a mouse or are you trying to use the keyboard?
I used my keyboard and clicked with the mouse (I am on a laptop so I’m not sure if that has to do with it).
Hmm, I’m assuming you were able to complete the previous JS challenges and it is just this one that is causing you problems? I would probably just move on to the next one knowing that you got this one right even though you weren’t officially able to complete it. It won’t affect your ability to get the JS certification at the end.
Please send a snippet, perhaps you wrote the code outside of specified area or broke something, OR try declaring variable first, before assigning on different line
The code @am.saurus posted at the top is correct. If you look at the challenge you will see there are no specified areas here, it is completely blank to begin with and you just add the two lines. You can test their code yourself to verify.
Hey, thank you so much for your suggestion. I moved on and completed some other ones then I came back to that one after restarting the program and it finally worked.