Repository navigation
JavaScript-IV - #1
ThorbenBender wants to merge 5 commits into
Conversation
samarv
left a comment
There was a problem hiding this comment.
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.
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', |
| gender: 'Male', | ||
| specialty: 'Python', | ||
| favLanguage: 'C++', | ||
| catchPhrase: 'If you have apple, you\'re doomed', |
No description provided.