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

Conversation

85pouya
Copy link

@85pouya 85pouya commented Feb 24, 2023

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?

@SallyMcGrath
Copy link
Member

👋 Hi there @85pouya . Please update your PR title to follow the format requested. If you take a look at https://github.com/CodeYourFuture/JavaScript-Core-1-Coursework-Week1/pulls you will see how everyone else is doing it. Thanks!

@85pouya 85pouya changed the title solved the issues in exercises 1-4 London 10 - Pouya Nasraei Ghomi - JavaScript-Core-1-Coursework-Week1 Mar 4, 2023
@85pouya
Copy link
Author

85pouya commented Mar 4, 2023

👋 Hi there @85pouya . Please update your PR title to follow the format requested. If you take a look at https://github.com/CodeYourFuture/JavaScript-Core-1-Coursework-Week1/pulls you will see how everyone else is doing it. Thanks!

hi, I just updated the PR title @SallyMcGrath


return "The total is total";
return `The total is ${total}`;
}

Choose a reason for hiding this comment

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

Hi Pouya, Good job! You forgot to create a variable into your function. I mean, try to add 'const' or 'let' before the word 'total'.
Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Thank you @Ali-Jahankah for your feedback. I added 'let' before 'total'

a * b * c;
return;
let multiply = a * b * c;
return(multiply);
}

/*

Choose a reason for hiding this comment

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

Nice one!

function addTaxAndFormatCurrency(price) {
let taxprice = price + price*0.2;
return taxprice = '£' + taxprice.toFixed(2);
}

Choose a reason for hiding this comment

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

Everything is fine. You can call 'calculateSalesTax' instead of rewriting the codes again. We call this 'DRY coding'. Your current way is fine, too.

I added let to assign total as the sum of a and b.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants