London class 10-Junita Lama-javaScript2-week1#223
London class 10-Junita Lama-javaScript2-week1#223Junitalama wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
| serving: 5, | ||
| ingredients: ["pasta", "spices", "tomato" ,"cheese", "salt"], | ||
| } | ||
|
|
There was a problem hiding this comment.
The recipes you've created above look good 😄
But have another look at the instructions on lines 13-20. Seems like they want you to output the recipe in this way:
Mole
Serves: 2
Ingredients:
cinnamon
cumin
cocoa
| @@ -18,7 +18,14 @@ const COUNTRY_CURRENCY_CODES = [ | |||
| ]; | |||
|
|
|||
There was a problem hiding this comment.
This looks good 👍
Small point: Keep an eye on the spacing / indentation of your code as this can make it easier for other developers to read it.
|
|
||
| function createShoppingList(recipe) { | ||
| // write code here | ||
| } |
There was a problem hiding this comment.
This looks great! Nice use of the filter array method 😄
| }; | ||
|
|
||
| let cashRegister = { | ||
| // write code here |
There was a problem hiding this comment.
This looks good. Again - just keep an eye on the formatting and spacing of your code. For example, your orderBurger function below would be a little easier to read like this:
orderBurger: function (balance) {
if (balance - MENU.burger >= 0) {
return balance - MENU.burger;
} else {
return balance;
}
},One quick way to do this is by using Format Document in VsCode.
| expect(convertScoreToGrade(83), "Z"); | ||
| expect(convertScoreToGrade(83)).toEqual("A"); | ||
| }); | ||
|
|
| } | ||
| */ | ||
|
|
||
| test("Trainee name Xin, score C", () => { |
There was a problem hiding this comment.
This test looks good, but it's usually a good idea to give the test a name which describes the scenario it is testing. Like in this case, maybe A trainee with a score of 63 should receive a grade of C (just an example).
| name: "Aman", | ||
| subjects: ["HTML", "CSS", "Databases"] | ||
| } | ||
| */ |
There was a problem hiding this comment.
Well done on all of these. Just remember to think about the best way to name your tests 😄
Imagine you make a change to your code - and this test starts to fail. In the test output, you will see Trainee name Aman - but this won't give you any useful information about which part of the code might be broken. Can you think of a better name for this?
|
|
||
| // write code here | ||
|
|
||
| return wordCount; |
There was a problem hiding this comment.
Seems like you have an extra return here?
| @@ -24,12 +24,36 @@ | |||
| */ | |||
|
|
|||
|
Really good job on this coursework @Junitalama! |
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
What did you find easy?
What did you find hard?
What do you still not understand?
Any other notes?