Now you'll be making many many variables. You will be so very able! (Sorry about that.)
Welcome to your first test-based assignment! You're gonna love it once you get the hang of it.
You'll:
- Fork and clone this repo.
- Navigate into the directory.
- Run
jest --watch-all
. - Write your code in the section below "YOUR CODE BELOW" in
main.js
. - Watch as your tests turn green.
- Add a link to your repo as your assignment submission when you're done!
- If another variable is mentioned in a task's description, that variable needs to appear in your code for that task to be marked correct. In other words, if
x
is5
and you're asked to sety
in terms ofx
so that it's twicex
, the following code is correct:
y = x * 2;
While the following code is not:
y = 10;
This is because in the first example, if x
changed value, y
would continue to be twice x
, but in the second example, y
would always be 10
.
- Create a variable called
myFirstName
. AssignmyFirstName
a string value that represents your first name. - Create a variable called
myLastName
. AssignmyLastName
a string value that represents your last name. - Create a variable called
myBestFriend
. AssignmyBestFriend
a string value that represents your best friend name. - Create a variable called
mySentence
. AssignmySentence
a string that includes the variables from the previous three tasks. - Create another variable called
myFavoriteNum
. AssignmyFavoriteNum
a number value that represents your favorite number! - Create another variable called
myMentalAge
. AssignmyMentalAge
a number value that represents your mental age! - Create another variable called
myHeight
. AssignmyHeight
a number value that represents your height in inches or centimeters! - Create another variable called
myFavoriteYear
. AssignmyFavoriteYear
a number value that represents your favorite year!
- Create another variable called
mySum
. Set it equal to the result of three plus one thousand nine hundred eighteen plus twenty-four plus one. Calculate it in code! - Create another variable called
myProduct
. Set it equal to the result of two hundred thirty-two times forty-three divided by two plus four (the operations should be written in that order!). Calculate it in code! - Create another variable called
heightAndAge
. Set it equal to the sum of your mental age and height. Calculate it in code!