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

javascript
non-track-course

#1

"Getting Started with Programming" Prompting lesson #30
https://www.codecademy.com/en/courses/programming-intro/5/3

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?


#2

Could you paste in the URL for the lesson..


#3

Sure https://www.codecademy.com/en/courses/programming-intro/5/3#


#4

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: https://www.codecademy.com/learn/javascript


#5

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!");
};

#6

That's why I suggest doing the newer course as its a bit easier to understand and follow:
https://www.codecademy.com/learn/javascript

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?");

#7

Thanks that helped :grin:.