Skip to content

Commit

Permalink
Update on aboutMe.js.
Browse files Browse the repository at this point in the history
Changes on the code for Stretch Goals PrimeAcademy#15.
Changes on some of the console.logs so they contain more info and are
    easier to understand when looking at the console.
  • Loading branch information
sschulte24110 committed Mar 28, 2024
1 parent 1e1ef8d commit 9853835
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions assignment/scripts/aboutMe.js
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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!",
Expand Down Expand Up @@ -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.';
Expand All @@ -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`
Expand Down

0 comments on commit 9853835

Please sign in to comment.