Variable not equal to anything


"Create a variable named notDefined, but don’t set it equal to anything.

Log the result to the console."

I have tried this every way I can think of, and it doesn’t work. Here’s an example of one of my attempts:

var notDefined =("") ;

I’m sure it is something simple, but I am not seeing it.




Ok, I found a solution:

var notDefined = undefined ;

If you have another solution, let me know.


here’s what I do:
let var;

Just make sure you put in the real variable not var!
I hope it works for you! :+1:


In this case I think they want the variable to be undefined, so I couldn’t make it quite that simple.

This is as simple as I could get it and get the “pass/green check mark” :

notDefined = undefined;



I just realized your problem. You are trying to assign notDefined the value of undefined. undefined means you didn’t assign it any value.
Put in: let notDefined;
let notDefined; will be like saying: notDefined means blank to me. You don’t GIVE notDefined the word undefined, you have to leave it at literally no defined value.
Quick question. Did you try my way?


Yes, and I thank for you answer, it was helpful. I had to tweek it a little bit, but that is to be expected.



Okay, I’m glad it worked out! :smile:


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