We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a40458c commit 0a8af10Copy full SHA for 0a8af10
Sprint-2/implement/vat.js
@@ -8,3 +8,16 @@
8
// Given a number,
9
// When I call this function with a number
10
// it returns the new price with VAT added on
11
+
12
13
+function addVatporcentage (price) {
14
+ const vatIncluded = Number(price * 1.2); //converted the str into number
15
+ return `Vat included ${vatIncluded}`;
16
17
+}
18
19
+console.log(addVatporcentage("30"));
20
21
+/*
22
+ This will return the new price with the vat included and also converted the string into number with the method Number()
23
+*/
0 commit comments