Glasgow_6 - Ehdaa_Sakawi - JS - Core2- Week1#264
Glasgow_6 - Ehdaa_Sakawi - JS - Core2- Week1#264Ehdaa-Munier wants to merge 1 commit intoCodeYourFuture:mainfrom
Conversation
|
|
||
| // write code here No newline at end of file | ||
| // write code here | ||
| let Recipe = { |
There was a problem hiding this comment.
it is a common javascript coding standard to have variable names that are camel cased : https://www.w3schools.com/js/js_conventions.asp
PascalCasing (such as your usage in "Recipe") is normally used for class definitions
| console.log(Recipe.ingredients[0]); | ||
| console.log(Recipe.ingredients[1]); | ||
| console.log(Recipe.ingredients[2]); No newline at end of file |
There was a problem hiding this comment.
❓ how could you change this to handle a variable amount of ingredients without adding any additional lines of code
| // write code here | ||
|
|
||
| let res = {}; | ||
| for( let [countrycodes, currencycodes] of countryCurrencyCodes){ |
There was a problem hiding this comment.
👍 nice use of destructuring here
There was a problem hiding this comment.
❓ have you ran prettier on this code
| Write a test that checks a score of 55 is grade D | ||
| */ | ||
| test("a score of 68 is grade D", () => { | ||
| expect(convertScoreToGrade(55)).toEqual("D"); | ||
| }); | ||
|
|
||
| /* | ||
| Write a test that checks a score of 49 is grade E | ||
| */ | ||
| test("a score of 68 is grade E", () => { | ||
| expect(convertScoreToGrade(49)).toEqual("E"); | ||
| }); | ||
|
|
||
| /* | ||
| Write a test that checks a score of 30 is grade E | ||
| */ | ||
|
|
||
| test("a score of 68 is grade E", () => { | ||
| expect(convertScoreToGrade(30)).toEqual("E"); | ||
| }); | ||
| /* | ||
| Write a test that checks a score of 70 is grade B | ||
| */ | ||
| test("a score of 68 is grade B", () => { | ||
| expect(convertScoreToGrade(70)).toEqual("B"); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
❓ Have you checked the names of these tests - it looks like you may have copy and pasted without updating
There was a problem hiding this comment.
Nothing wrong with your code here - the provided function "convertScoreToGrade" is missing the score parameter here which you will need to add to pass the tests
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?