Skip to content
This repository was archived by the owner on Oct 26, 2020. It is now read-only.

Commit 1630298

Browse files
committed
Clarify that function should add tax
1 parent aebc617 commit 1630298

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

week-1/2-mandatory/4-tax.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ function calculateSalesTax() {}
1212
===================
1313
The business has informed you that prices must have 2 decimal places
1414
They must also start with the currency symbol
15-
Write a function that transforms numbers into the format £0.00
15+
Write a function that adds tax to a number, and then transforms the total into the format £0.00
1616
1717
Remember that the prices must include the sales tax (hint: you already wrote a function for this!)
1818
*/
1919

20-
function formatCurrency() {}
20+
function addTaxAndFormatCurrency() {}
2121

2222
/* ======= TESTS - DO NOT MODIFY =====
2323
There are some Tests in this file that will help you work out if your code is working.
@@ -41,6 +41,6 @@ test("calculateSalesTax function - case 1 works", calculateSalesTax(15), 18)
4141
test("calculateSalesTax function - case 2 works", calculateSalesTax(17.5), 21)
4242
test("calculateSalesTax function - case 3 works", calculateSalesTax(34), 40.8)
4343

44-
test("formatCurrency function - case 1 works", formatCurrency(15), "£18.00")
45-
test("formatCurrency function - case 2 works", formatCurrency(17.5), "£21.00")
46-
test("formatCurrency function - case 3 works", formatCurrency(34), "£40.80")
44+
test("addTaxAndFormatCurrency function - case 1 works", addTaxAndFormatCurrency(15), "£18.00")
45+
test("addTaxAndFormatCurrency function - case 2 works", addTaxAndFormatCurrency(17.5), "£21.00")
46+
test("addTaxAndFormatCurrency function - case 3 works", addTaxAndFormatCurrency(34), "£40.80")

0 commit comments

Comments
 (0)