Java challenge 3 failed to be approved

Java challenge 3 failed to be approved
0

#1

Am stuck here, challenge doesn’t seem to be correct, I can’t go to the next challenge. Please help


Tell us what’s happening:

Your code so far



// Only change code above this line.
// We use this function to show you the value of your variable in your output box.
// You'll learn about functions soon.
var myName="Mercy"
if(typeof(myName) !== "undefined"){(function(v){return v;})(myName);}

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Linux; Android 6.0; Hisense U989 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36.

Link to the challenge:


#2

You should declare myName with the var keyword, ending with a semicolon


#3

I did that, can you show me an example please?


#4

Your code has the following line

var myName = "Mercy" 

Note that there is no semicolon at the end.


#5


#6

You can check the second screen shot


#7

Ah I see, you should not give myName a value.


#8

I don’t understand you,
What am I supposed to do?
Please give me an example here. Am still stuck


#9

The example was given in the challenge (see below):

var ourName;

The challenge just wants you to create another variable call myName using the var keyword. You do not have to assign it any value.