- You can paste
starter.jsin JSBIN (preferred) or fork and create a cloud9 project. - You'll need to use the Javascript prompt method, so here is an example.
var favoriteColor = prompt('What is your favorite color');
console.log(favoriteColor)- Ask the user for their full (first and last) name. Store it in a variable and then print it.
- Put the first name in its own variable. Repeat for the last name. Print each variable.
- Print the last letter of their first name and the first letter of their last name.
- Add the following to the beginning of the first name variable: "Your name is ". Print it.
- Add the following to the end of the last name variable: "!". Print it.
- Concatenate the first name and the last name together and store it in a new variable called x. Print it.
- Ask the user how old they are. Store it in a variable and then print it.
- Add the following to the end of variable x: "And you're [age] years old!". Print x.
Your JavaScript code, either a JSBIN link or Github Repo