-
-
Notifications
You must be signed in to change notification settings - Fork 481
London 10 - Pouya Nasraei Ghomi - JavaScript-Core-1-Coursework-Week1 #530
base: master
Are you sure you want to change the base?
Conversation
👋 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}`; | ||
} |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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); | ||
} | ||
|
||
/* |
There was a problem hiding this comment.
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); | ||
} | ||
|
There was a problem hiding this comment.
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.
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 repositoryYour Details
Homework Details
Notes
What did you find easy?
What did you find hard?
What do you still not understand?
Any other notes?