LND10 | Adrian Ilovan | JS2-Coursework-Week1#266
LND10 | Adrian Ilovan | JS2-Coursework-Week1#266AdrianIlovan wants to merge 4 commits intoCodeYourFuture:mainfrom
Conversation
| let dogName; // complete the code | ||
| let dogBreed; // complete the code | ||
| let dogName = dog.name; // complete the code | ||
| let dogBreed = dog.breed; // complete the code |
| // write code here | ||
|
|
||
| let sortedPlayers = basketballTeam.topPlayers.sort(); | ||
| sortedPlayers.forEach(player => console.log(player)); |
| console.log(`Student name: ${name}`) | ||
| } | ||
| } | ||
|
|
|
|
||
| test("a score of 30 is grade E", () => { | ||
| expect(convertScoreToGrade(30)).toEqual("E"); | ||
| }); |
There was a problem hiding this comment.
your tests look good! Nice job
--Could you think of other ways to write the tests?
There was a problem hiding this comment.
Yes! We can solve this using If/else statements, using an array to a function that converts score to grade, or using switch.
| score: 63 | ||
| } | ||
| */ | ||
| }; |
There was a problem hiding this comment.
Think you are missing a bit with these tests....
Take a look at the expect function :)
Also-- I think there are about 4 more tests after this one which should be updated!
|
|
||
| let cashRegister = { | ||
| // write code here | ||
| orderBurger(balance) { |
There was a problem hiding this comment.
nice job! Very clean writing of this function
| title: "Mole", | ||
| servings: 2, | ||
| ingredients: ["cinnamon", "cumin", "cocoa"] | ||
| }; |
There was a problem hiding this comment.
So this looks good, no issues with your objects. But you could try to do this as a nested object instead?
|
|
||
| for (let i = 0; i < recipe.ingredients.length; i++) { | ||
| let ingredient = recipe.ingredients[i]; | ||
| if (!pantry.fridgeContents.includes(ingredient) && !pantry.cupboardContents.includes(ingredient)) { |
There was a problem hiding this comment.
This looks good! Nice use of ! and &&
--have you thought about concatenating the fridge and cupboard ingredients first?
There was a problem hiding this comment.
Had problems with this one and checked GPT for help
|
Hi! Really nice job on these. Both the exercises and mandatory work look good. I have put a few small comments about things you can think about, but overall really nice work! It looks like what you thought you were missing was the writing-advanced-tests. Seems you had started on these, but still missing a few :) If you update it and want me to review the changes you made, go ahead and select the 're-request review' under my name in the reviewers (if you have trouble, just message me). Nice work again, and keep it up! |
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin the root of this repositoryYour Details
Homework Details
Notes
-I closed this pull request because I read on my notes that it's not finished, however after checking again I am PR-ing this again because it seems done , thank you :)