-
-
Notifications
You must be signed in to change notification settings - Fork 480
london10| Akram Izedi | javascript |week1 #537
base: master
Are you sure you want to change the base?
Conversation
| function addNumbers(a b c) { | ||
| function addNumbers(a,b,c) { | ||
| return a + b + c; | ||
| } |
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.
Comment: These three first questions has the same code as mine
| function multiply(a,b,c) { | ||
| let times= a*b*c; | ||
| return times ; | ||
| } |
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.
Consider: This is how I wrote. Just different names.
function multiply(a, b, c) {
const answer = a * b * c;
return answer;
}
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.
@softacoder have you used this button in the Github UI?

| function getRandomNumber() { | ||
| return Math.random() * 10; | ||
| } | ||
| //Math.random() The Math.random() static method returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range // |
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.
Comment: Well done. You written the code as I have on these three questions.
| function calculateSalesTax(productPrice) { | ||
| let salesTaxForProduct = (productPrice + ((productPrice * 20) / 100)) | ||
| return salesTaxForProduct; | ||
| }; |
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.
Comment: Well done. Here is another way to consider
function calculateSalesTax(sales) {
let tax = sales * 0.2;
let total = sales + tax;
return total;
}
| let salesTaxForProduct = (productPrice + ((productPrice * 20) / 100)).toFixed(2); | ||
| let showTaxAmount = "£".concat(salesTaxForProduct) | ||
| return showTaxAmount; | ||
| }; |
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.
Comment: Interesting solution. It works?
Mine:
function addTaxAndFormatCurrency(sales) {
return "£" + calculateSalesTax(sales).toFixed(2);
}
|
Hi Mitch
No, I have not used it yet. I have been on Github and tried to find the
button, but cannot. Is it used when I do reviews?
I assume you can add coding suggestions.
Thanks for the feedback!
…On Tue, 28 Feb 2023 at 19:23, MitchLloyd ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In mandatory/2-logic-error.js
<#537 (comment)>
:
> }
-function multiply(a, b, c) {
- a * b * c;
- return;
+function multiply(a,b,c) {
+ let times= a*b*c;
+ return times ;
}
@softacoder <https://github.com/softacoder> have you used this button in
the Github UI?
[image: image]
<https://user-images.githubusercontent.com/25401570/221957506-074360c2-8fdd-4393-a7e9-f96ae10d7070.png>
—
Reply to this email directly, view it on GitHub
<#537 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A27REK6JK46IVMWHPCZXW2DWZZGDFANCNFSM6AAAAAAVHZEWZU>
.
You are receiving this because you were mentioned.Message ID:
<CodeYourFuture/JavaScript-Core-1-Coursework-Week1/pull/537/review/1318410592
@github.com>
|
|
. |
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin 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?