London 9 Turing - Zahraa Tayyar - JavaScript Core 2 - Week 1#164
London 9 Turing - Zahraa Tayyar - JavaScript Core 2 - Week 1#164zahraateee wants to merge 6 commits intoCodeYourFuture:mainfrom
Conversation
| // write code here | ||
| shoppingList = { | ||
| name: recipe.name, | ||
| items: recipe.ingredients.filter(value => pantry.fridgeContents.includes(value) && pantry.cupboardContents.includes(value)) |
selinfildis
left a comment
There was a problem hiding this comment.
Nice job, left a couple of comments that would help you resolve failing tests :)
| } | ||
| } | ||
|
|
||
| return balance; |
There was a problem hiding this comment.
it looks like your return statements on this file are misplaced, they should be in the function definitions, similar to the ones you've written on 3-shopping-list.js
| } | ||
| } | ||
|
|
||
| return balance; |
There was a problem hiding this comment.
similar to the above, this should be in the related function :)
There was a problem hiding this comment.
Fixing the return statement's location would also help with the tests :) https://github.com/CodeYourFuture/JavaScript-Core-2-Coursework-Week1/actions/runs/3861676813/jobs/6582791676
| console.log(cashregister.orderBurger(balance)) | ||
|
|
||
| let falafelBalance = 7.25; | ||
| console.log(cashRegister.orderFalafel(Falafelbalance)) |
There was a problem hiding this comment.
I think the argument for the orderFalafel should be falafelBalance instead
|
|
||
| let myCountry = "UnitedKingdom"; | ||
| let myCapitalCity; // complete the code | ||
| let myCapitalCity = capitalCities["UnitedKingdom"] // complete the code |
There was a problem hiding this comment.
here you can use the variable myCountry to fetch the capital for the country, as the variable is assigned the string UnitedKingdom :)
| basketballTeam.topPlayers | ||
| .sort() | ||
| .forEach(value => console.log(value)) | ||
|
|
| }; | ||
|
|
||
| console.log(car["colour"]); | ||
| console.log(car["colour"]); // "colour" isnt a property in the "car" object. "colour" is undefined. |
| getName: function(name) { | ||
| console.log(`Student name: ${name}`) | ||
| } |
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?