- Fork this repository to start a new project in your
reposfolder ==git clone <your github repo url> cd JavaScript_Variablesto navigate into your new repo directory- Type the command
code .to open VSC with the JavaScript_Variables folder - Open the app.js file
- Declare a variable named firstName using the
constkeyword, and assign your name as the string value - Declare a variable named lastName using the
letkeyword, and assign your name as the string value - Declare a variable named age using the
varkeyword, and assign your age as the number value
- Declare a variable named fullName using the
letkeyword, and assign yourfirstNameplus yourlastNameas the string value - Print the value of
fullNameto the console (to open you browser console in Google Chrome, right-click and press "Inspect" or fn+F12) - BONUS: Complete step two using a template literal instead of concatenation
- Declare a variable named myStory using the
letkeyword, and assign a string with 3 sentences detailing:- An introduction using your
fullNamevariable. - An introduction using your
cityvariable. - An introduction using your favorite
passtimevariable.
- An introduction using your
- Be sure to use variables as the above answers (declare and assign variables if you haven't already)
- Print the result of
myStoryto the browser console
Ex:
let myStory = `\Hello! My name is ${fullName}. I live in ${city}. I enjoy ${passtime} and coding!`;