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

london10| Akram Izedi | javascript |week1 - #537

Open
AkramIzedi wants to merge 4 commits into
CodeYourFuture:masterfrom
AkramIzedi:master
Open

london10| Akram Izedi | javascript |week1#537
AkramIzedi wants to merge 4 commits into
CodeYourFuture:masterfrom
AkramIzedi:master

Conversation

@AkramIzedi

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?

function addNumbers(a b c) {
function addNumbers(a,b,c) {
return a + b + c;
}

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: These three first questions has the same code as mine

function multiply(a,b,c) {
let times= a*b*c;
return times ;
}

Copy link
Copy Markdown

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;
}

Copy link
Copy Markdown
Contributor

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?
image

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 //

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: Well done. You written the code as I have on these three questions.

Comment threadmandatory/4-tax.js
function calculateSalesTax(productPrice) {
let salesTaxForProduct = (productPrice + ((productPrice * 20) / 100))
return salesTaxForProduct;
};

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: Well done. Here is another way to consider
function calculateSalesTax(sales) {
let tax = sales * 0.2;
let total = sales + tax;
return total;
}

Comment threadmandatory/4-tax.js
let salesTaxForProduct = (productPrice + ((productPrice * 20) / 100)).toFixed(2);
let showTaxAmount = "£".concat(salesTaxForProduct)
return showTaxAmount;
};

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: Interesting solution. It works?
Mine:
function addTaxAndFormatCurrency(sales) {
return "£" + calculateSalesTax(sales).toFixed(2);
}

@softacoder

softacoder commented Mar 1, 2023 via email

Copy link
Copy Markdown

@AkramIzedi
AkramIzedi requested a review from Shadi38March 29, 2023 09:17
@AkramIzedi

Copy link
Copy Markdown
Author

.

Sign up for freeto 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.

3 participants

@AkramIzedi@softacoder@Dedekind561