-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alison Nooner #198
base: main
Are you sure you want to change the base?
Alison Nooner #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Ali, I just had a chance to go over your prework and you are officially turing ready
! I added some comments to a few sections for areas to work on or adjustments to make before starting Mod 1. Keep up the hard work moving forward and let me know if you have any questions.
// Declare two variables - fullPower AND fullEnergy | ||
// fullPower should multiply your current power by 500 | ||
// fullEnergy should add 150 to your current energy | ||
|
||
var fullPower = (power * 500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for parenthesis, because we aren't using order of operations here, but it doesn't hurt anything. 👍
// Print the last archEnemy to the console | ||
|
||
console.log(archEnemy[2]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be the archEnemies array instead of archEnemy, but that's an easy fix!
function assessSituation (dangerLevel, saveTheDay, badExcuse){ | ||
if (dangerLevel > 50){ | ||
console.log(badExcuse); | ||
} else if (dangerLevel >=10 && dangerLevel <=50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since line 49 already checks for dangerLevel greater than 50, line 51 could simply check for dangerLevel > 9, but this works too!
9. What questions do you still have about the work we've done so far? (not having a question is not an option) | ||
|
||
I am wondering how we would store a phone number as a variable and what data type that would be considered. A phone number is a list of numbers, so my gut says it would be numeric. However, the more I think about it, the more I think it would be a string data type, because to return a phone number to a user, we would want the phone number to print as, for example, (555) 555-5555, not 5555555555. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! A phone number would be a string, because we would never perform any mathematical operations on a phone number. Same thing with zip codes and credit card numbers. Great thinking!
Here is my Mod 1 Prework!