The Original "Getting Started with Programming" Prompting lesson #30



"Getting Started with Programming" Prompting lesson #30

I'm stuck at the Prompting lesson and don't know what to do could someone explain to me what i'm suposed to do there?


Could you paste in the URL for the lesson..




You need to change the first line of code
This line: var name;
make it a prompt with var name

Have a look at the hint for a clue..

If you don't come right paste in the code what you typed in and I will help you..

*This course is not listed as it has a few glitches and you might not be able to finish the course as the SCT checker(for code) is not working on all lessons in this course.
Also its best if you do the latest course as explanations are a little better:


Yes but the thing is, i don't know how to do that. I've tried to understand the Instructions and the Hint but i still don't know what do i have to write in there i don't know if it's:

var name prompt("what's your name?")

or is it 

var name;
prompt("what's your name?")

if(name === "Sam") {
  console.log("Your name is Sam!");
} else{
  console.log("Your name isn't Sam!");


That's why I suggest doing the newer course as its a bit easier to understand and follow:

This line is quite close you are missing the = which will assign the value of prompt to the variable name, as well as a semi colon at the end

Like this:

var name = prompt("what's your name?");


Thanks that helped :grin:.