Challenge Hints: Math

A list of hints for the challenges in the Math lesson..

Last updated - July 23, 2024

 

Checkpoint

Did you create two new variables with an integer value?

Try using "alert()" to add two number variables together

The Discount

Did you remember to declare a variable that holds the original cost?

Did you remember to multiply the cost by 1-.2 to get the discounted rate?

Did you remember to alert the user of the total cost?

Feed the Family

Did you remember to create at least 4 different of food for the meal?

Did you remember to divide each food item by the number of people being served?

Did you remember to log each portion size?

Dollars to Coins

Did you prompt the user for the number of dollars to convert?

Did you properly perform the calculations for quarters, dimes, nickels, and pennies?

console.log()

Popsicle Stand Pt. I

Did you create variables for all of the values given in the word problem and name them like the requirement says? Check that you recorded each of the values correctly!

Did you add the price of a box to itself or multiply it by 2, and store the result in a variable called totalCost?

Did you add all three people's money together? Make sure to add the variables together (peter + you rather than 4.25 + 3.21) 

Did you subtract your total money from your total cost? Don't forget to store it in amountNeeded

Did you remember to pass amountNeeded to a console.log()?

Popsicle Stand Pt. II

Did you name your variable otterPopBoxPrice? Did you set it equal to 7.99?

Did you set a variable called totalCost equal to otterPopBox times two?

Divide the total cost by the number of otter pops in both boxes

Inside your console log, did you add something to the cost of the otter pops?

For more help with JavaScript, check out our JavaScript Reference Guide!