Stings are still declared with the var statement. To do this we use the prompt function. In this case we will look at making a short and very simple mad lib. The first thing we need to do is to set our basic head statements for JavaScript and declare some variables. These will be used from the above example.
Prompts are variables that prompt the user for the value that is to be assigned to the variable.
This is used to set the default value in the prompt window. This is entirely optional and not required for the prompt to work. I have also added a variable declaring that alive is equal to someone's age times the number of seconds in a year. Note that values for variables are not placed in quotes, and strict text in between the variables is placed in quotes. You should also note how I have separated variables and text in the third line.