Convert the information that you have about yourself into variables in Javascript.
- Create a variable called
myFirstName
that contains your first name.example: "Luffy"
- Create a variable called
myLastName
that contains your last name. - Create a variable called
myFullName
that contains both first and last name. Use the previously created variables to do this.π - Create a variable called
myHobbies
that contains a list of your hobbies.example: eat, fight, get on the ship
- Create a variable called
currentStudent
that is a boolean (true or false) that says if you are a student or not.example: false
- Create a variable called
myDream
that contains description about your dream. - Create a variable called
bestFriend
that contains the name of your closest friend. - Create a variable called
phoneNumber
that contains a phone number. - Create a variable called
favoriteMeal
that contains the name of your favorite meal, I already know it's Kunafa thoughπ. - Create a variable called
myBirthYear
that contains the year you were born. - Create a variable called
currentYear
that contains the current year. - Create a variable called
myAge
that will show your age. Use the previously created variables to calculate this. - After you wrote all the above variables, look at them again. Are there any variables that won't be changing like your name? If there is then change them to
const
.
- Print all variables in the console with meaningful description.
Hope you have fun coding! π©βπ»π¨βπ»