Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

London Class No 7 - Nigel Pelvin - Javascript Core 2 - Week 1 - #44

Closed
nPelvin wants to merge 1 commit into
CodeYourFuture:mainfrom
nPelvin:main
Closed

London Class No 7 - Nigel Pelvin - Javascript Core 2 - Week 1#44
nPelvin wants to merge 1 commit into
CodeYourFuture:mainfrom
nPelvin:main

Conversation

@nPelvin

@nPelvin nPelvin commented Feb 20, 2021

Copy link
Copy Markdown

Completed mandatory exercises! Woop woop!!

Your Details

  • Your Name:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Completed mandatory exercises! Woop woop!!
Comment thread mandatory/5-recipes.js

let recipes = {};
let recipes = [
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread mandatory/5-recipes.js
"banana"]
},
];
for (let i of recipes) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you think of a more descriptive name for this variable than i?

Comment on lines +36 to 39
if (this.volume<0){
this.volume=0;
}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@syedur-r syedur-r added the reviewed A mentor has reviewed this code label Feb 26, 2021
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the Stale label May 14, 2021
@github-actions github-actions Bot closed this May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

reviewed A mentor has reviewed this code Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants