-
Notifications
You must be signed in to change notification settings - Fork 0
JavaScript-IV #1
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
base: master
Are you sure you want to change the base?
Conversation
samarv
left a comment
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.
Project Objective
-
Convert all of your constructors into ES6 Classes using the class and extends keywords. You should be able to run your same logs and they should build out the proper expected behaviors.
-
Create classes for Lambda Instructor
-
Create classes for Lambda PM
-
Create classes for Lambda Students.
Stretch
- Extend the functionality of the Student by adding a prop called grade and setting it equal to a number between 1-100.
- Now that our students have a grade build out a method on the Instructor (this will be used by BOTH instructors and PM's) that will randomly add or subtract points to a student's grade. Math.random will help.
- Add a graduate method to a student.
- This method, when called, will check the grade of the student and see if they're ready to graduate from Lambda School
- If the student's grade is above a 70% let them graduate! Otherswise go back to grading their assignments to increase their score.
Module Objective
- describe and demonstrate how class syntax works.
- convert a pseudo classically instantiated program into class syntax
Conclusion
Hey Craig, Your code is pretty spot on. Your git flow is great. Your approach is clean and precise.
There's just one thing I want to reiterate - Try to keep your code DRY. when you are repeating yourself, think of creating a function.
Other than that, You are doing a marvellous job. Lemme know if you have any questions.
| console.log(`Today we are learning about ${subject}`); | ||
| } | ||
| grade(student, subject) { | ||
| let randNum = Math.floor(Math.random()*3); |
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.
Try and keep your code DRY. You are using - Math.floor(Math.random() ); in 3 different places inside one function. maybe you can create a function?
| gender: 'Male', | ||
| specialty: 'React', | ||
| favLanguage: 'JavaScript', | ||
| catchPhrase: 'If you have windows, you\'re doomed', |
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.
amen!
| gender: 'Male', | ||
| specialty: 'Python', | ||
| favLanguage: 'C++', | ||
| catchPhrase: 'If you have apple, you\'re doomed', |
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.
not true.
No description provided.