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

London 9 - Andriana Saffo - JavaScript 2 - Week 1 - #171

Open
AndrianaOS wants to merge 12 commits into
CodeYourFuture:mainfrom
AndrianaOS:main
Open

London 9 - Andriana Saffo - JavaScript 2 - Week 1#171
AndrianaOS wants to merge 12 commits into
CodeYourFuture:mainfrom
AndrianaOS:main

Conversation

@AndrianaOS

Copy link
Copy Markdown

Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in HOW_TO_MARK.md in the root of this repository

Your Details

  • Your Name: Andriana Saffo
  • Your City: London
  • Your Slack Name: Andriana

Homework Details

  • Module: JavaScript 2
  • Week: 1

Notes

  • What did you find easy?

  • Accessing items in an object using dot notation

  • What did you find hard?

  • Finding missing items from 2 separate objects

  • What do you still not understand?

  • Any other notes?
    Exercises completed. Only 1 mandatory exercise left to complete

sortedNames.forEach((name) => {
console.log(name);
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great job, you can also use forEach straight away instead of using a variable and then use forEach
basketballTeam.topPlayers.sort().forEach(name => console.log(name))

orderBurger: function (balance) {
if (balance >= MENU.burger) {
let newBalance = MENU.burger - balance;
return newBalance;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good job, you do not need a new variable here, you can return the value straight away
you can use ternary operator too if you would like

}
},
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here :)

newShoppingList.items = [];

const pantryList = Object.values(pantry).flat();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good job, you can also use concat to merge two arrays together :)

Comment thread 2-mandatory/1-recipes.js
console.log(`${key}: ${eachRecipe[key]}`);
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good job, where are the allRecipes? :D

@ellietms ellietms added the reviewed A mentor has reviewed this code label Dec 30, 2022
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants