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

Glasgow_6 - Ehdaa_Sakawi - JS - Core2- Week1#264

Open
Ehdaa-Munier wants to merge 1 commit intoCodeYourFuture:mainfrom
Ehdaa-Munier:main
Open

Glasgow_6 - Ehdaa_Sakawi - JS - Core2- Week1#264
Ehdaa-Munier wants to merge 1 commit intoCodeYourFuture:mainfrom
Ehdaa-Munier:main

Conversation

@Ehdaa-Munier
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?

Copy link
Copy Markdown

@DaleCausierIress DaleCausierIress left a comment

Choose a reason for hiding this comment

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

Nice work

Comment thread 2-mandatory/1-recipes.js

// write code here No newline at end of file
// write code here
let Recipe = {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

it is a common javascript coding standard to have variable names that are camel cased : https://www.w3schools.com/js/js_conventions.asp

PascalCasing (such as your usage in "Recipe") is normally used for class definitions

Comment thread 2-mandatory/1-recipes.js
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread 2-mandatory/1-recipes.js
Comment on lines +34 to +36
console.log(Recipe.ingredients[0]);
console.log(Recipe.ingredients[1]);
console.log(Recipe.ingredients[2]); No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

❓ how could you change this to handle a variable amount of ingredients without adding any additional lines of code

💡 hint: https://www.w3schools.com/jsref/jsref_foreach.asp

// write code here

let res = {};
for( let [countrycodes, currencycodes] of countryCurrencyCodes){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 nice use of destructuring here

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice and concise 👍

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

❓ have you ran prettier on this code

Comment on lines 75 to +99
Write a test that checks a score of 55 is grade D
*/
test("a score of 68 is grade D", () => {
expect(convertScoreToGrade(55)).toEqual("D");
});

/*
Write a test that checks a score of 49 is grade E
*/
test("a score of 68 is grade E", () => {
expect(convertScoreToGrade(49)).toEqual("E");
});

/*
Write a test that checks a score of 30 is grade E
*/

test("a score of 68 is grade E", () => {
expect(convertScoreToGrade(30)).toEqual("E");
});
/*
Write a test that checks a score of 70 is grade B
*/
test("a score of 68 is grade B", () => {
expect(convertScoreToGrade(70)).toEqual("B");
}); No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

❓ Have you checked the names of these tests - it looks like you may have copy and pasted without updating

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nothing wrong with your code here - the provided function "convertScoreToGrade" is missing the score parameter here which you will need to add to pass the tests

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants