London Class No 7 - Nigel Pelvin - Javascript Core 2 - Week 1 - #44
London Class No 7 - Nigel Pelvin - Javascript Core 2 - Week 1#44nPelvin wants to merge 1 commit into
Conversation
Completed mandatory exercises! Woop woop!!
|
|
||
| let recipes = {}; | ||
| let recipes = [ | ||
| { |
There was a problem hiding this comment.
You did a great job defining the list as an array and then each recipe as an object.
One suggestion would be to always use lowercase when naming your properties - that's the usual convention and you'll see it done that way consistently in documentation/tutorials etc.
So instead of Title, Serves, Ingredients have title, serves, ingredients.
| "banana"] | ||
| }, | ||
| ]; | ||
| for (let i of recipes) { |
There was a problem hiding this comment.
Can you think of a more descriptive name for this variable than i?
| if (this.volume<0){ | ||
| this.volume=0; | ||
| } | ||
| }, |
There was a problem hiding this comment.
Great solution! Well done
Just a quick note, you could've made use of the isEmpty() function to check if the volume is equal to 0. This would be a good example of code reusability.
|
Your coursework submission has been closed because nobody has interacted with it in six weeks. You are welcome to re-open it to get more feedback. |
Completed mandatory exercises! Woop woop!!
Your Details
Homework Details