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

London 9 - Abdulmajid Rammali - JS Core-2 - Week 1#166

Open
Abdulmajidram wants to merge 1 commit into
CodeYourFuture:mainfrom
Abdulmajidram:main
Open

London 9 - Abdulmajid Rammali - JS Core-2 - Week 1#166
Abdulmajidram wants to merge 1 commit into
CodeYourFuture:mainfrom
Abdulmajidram:main

Conversation

@Abdulmajidram
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:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?


for (let player of topPlayers) {
console.log(player);
}
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 do it with map/forEach function in one line :
basketballTeam.topPlayers.sort().forEach/map(player => console.log(player))

if (student.attendance >= 90 && student.examScore > 60) {
student["hasPassed"] = true;
}

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 add else for false value too :) .
you can use ternary operator as well

Comment thread 2-mandatory/1-recipes.js
console.log(ingredient);
}


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.

here we wanted you to create 5 receipts and show each key of each receipts in one line , can you think of the solution, if you need help just @ me here, I can send you some tips and the solution :)

lookup[countryCode] = currencyCode;
}
return lookup;

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 :)

};

for (let ingredient of recipe.ingredients) {
if (!pantry.fridgeContents.includes(ingredient) && !pantry.cupboardContents.includes(ingredient)) {
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.

well done, you can also use concat to merge two arrays and check once if the value is in there or not , so you can merge the pantry.fridgeContents and pantry.cupboardContents in one array and check includes for that array, does this makes sense? let me know if you need more explanation about this :)

return balance - MENU.falafel;
}
return balance;
}
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 ternary operator too :)

@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