diff --git a/assignment/scripts/aboutMe.js b/assignment/scripts/aboutMe.js index 1da88dde..9e32de23 100644 --- a/assignment/scripts/aboutMe.js +++ b/assignment/scripts/aboutMe.js @@ -1,23 +1,23 @@ // REQUIRED FEATURES: // 1 - Create a variable called `firstName` and assign it the value of your first name let firstName = 'Scott'; -console.log(firstName); +console.log(`My first name is ${firstName}`); // 2 - Create a second variable called `lastName` and assign it the value of your last name let lastName = 'Schulte'; -console.log(lastName); +console.log(`My last name is ${lastName}`); // 3 - Create a third variable called `fullName`, assign it the value of your first and last name // (remember, you already have variables for this, can you use those?) // Console log the value of `fullName` // let fullName = firstName + ' ' + lastName; let fullName = `${firstName} ${lastName}`; -console.log(fullName); +console.log(`My full name is ${fullName}`); // 4 - Create a variable called `luckyNumber` and assign it the value of your lucky number. // Console log the value of `luckyNumber` let luckyNumber = 7; -console.log(luckyNumber); +console.log('My lucky number is', luckyNumber); // 5 - Create a variable `introduction` and using the variables from above, // give it the value of: @@ -36,24 +36,24 @@ console.log(adventurous); // 7 - Create a variable named `food`, and set its value to a string of your favorite food // Console log the value of `food` let food = "Happy Joe's Taco Pizza"; -console.log(food); +console.log('My favorite food is', food); // 8 - Create a variable called `pets` and set it to the value of the number of pets you have // Console log the value of `pets` let pets = 1; -console.log(pets); +console.log('My pets =', pets); // 9 - Create a variable called `friendsPets` and assign it the value of the number of pets your friend has let friendsPets = 1; -console.log(friendsPets); +console.log('My friends pets =', friendsPets); // 10 - Add two pets to your `pets` variable pets = pets + 2; -console.log(pets); +console.log('My pets =', pets); // 11 - Create a constant variable called `allowedPets` and set it to a number value of your choice let allowedPets = 2; -console.log(allowedPets); +console.log('Pets allowed =', allowedPets); // 12 - Create a variable called `result`. Create a conditional: // if adventurous is true, set `result` to be "Adventures are great!", @@ -88,7 +88,7 @@ console.log(diceRoll); // set `petStatus` to the value of "I have enough pets" // if the value of `pets` is greater than the value of `allowedPets`. // set `petStatus` to the value of "Oh no, I have too many pets!" -let petStatus; +let petStatus = ''; if (pets < allowedPets) { petStatus = 'I can have more pets.'; @@ -107,16 +107,17 @@ console.log(petStatus); // assigns the highest value to `mostPets`. There's several possibilities -- // be sure to think through all the scenarios. // console.log `mostPets` after the conditional has run. -let mostPets; +let mostPets = 0; if (pets === friendsPets) { - mostPets = 'You have the same number of pets.'; + mostPets = pets; }else if (pets > friendsPets) { mostPets = pets; } else if (pets < friendsPets) { mostPets = friendsPets; }; -console.log(mostPets); +// console.log('most pets =', mostPets); +console.log(`most pets = ${mostPets}`); // 16 - Make a variable called `luckyResult`