Conversation
problems/variables.js
Outdated
|
|
||
| let birthYear = '1977' | ||
| let futureYear = '2021' | ||
| let minimumAge = '44' |
There was a problem hiding this comment.
Instead of telling me what min and max age are, we want to see an equation.
If you think about it, the minimum age changes when we change birthYear or futureYear so we want to have an equation so our minimumAge and maximumAge are always correct.
| let curAge = "30" | ||
| const maxAge = "99" | ||
| let snackCount = "3" | ||
| let snackNumber = ((maxAge - curAge)*(snackCount * 365)) |
There was a problem hiding this comment.
Good use of equation. This is the type of solution I want to see in Question 1
problems/variables.js
Outdated
|
|
||
| let radius = "2" | ||
| let circumferenceOfCircle = Math.PI * radius | ||
| let areaOfCircle = Math.PI * (radius * 2) |
There was a problem hiding this comment.
I like how you're saving equations in variables, but look at the link provided for properties of a circle. Your equations are not correct.
problems/variables.js
Outdated
| let fahrenheit = "73F°" | ||
| console.log("if we were to convert " + celsius + " to Fahrenheit, we would get " + fahrenheit+".") | ||
| fahrenheit = "34F°" | ||
| celsius = "1C°" |
There was a problem hiding this comment.
I need to see an equation for the same reason as question 1!
problems/variables.js
Outdated
| let dee = 90 | ||
| average = (bob + cam + alice + dee) / 4 | ||
| console.log ( ' The new average of the all students is ' + average) | ||
| if(dee > average ) console.log("Dees grade is higher than average") |
There was a problem hiding this comment.
LOVE the use of this conditional. Great work
problems/variables.js
Outdated
| // * 3 | ||
|
|
||
| let a = "584" | ||
| let output = a[a.length-1] |
There was a problem hiding this comment.
While this is correct, we want to see you use the module to figure it out
problems/variables.js
Outdated
| let numberOfDogs = 60 | ||
|
|
||
| let catPerc = numberOfCats / (numberOfCats + numberOfDogs)*100 | ||
| let dogPerc = numberOfDogs / (numberOfCats + numberOfDogs)*100 |
There was a problem hiding this comment.
you need parentheses around your division because of PEMDAS
| // * Log the result to the screen like this: "You will need `snackNumber` to last you until the age of `maxAge`". | ||
|
|
||
| // ## Problem Three | ||
| let curAge = "30" |
There was a problem hiding this comment.
Age should be numbers on strings
|
|
||
|
|
||
| let radius = 7 | ||
| let areaOfCircle = (radius * radius * Math.PI) |
There was a problem hiding this comment.
Nice job using Math library. Can also us it for Math.pow(radius, 2)
|
|
||
|
|
||
| function leapYear(yr) { | ||
| if ((yr % 4 == 0 ) && ( yr % 100 != 0)) |
There was a problem hiding this comment.
Always use triple equals === (strict equaltiy)
No description provided.