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 faeb0ff commit ebb51e5Copy full SHA for ebb51e5
Sprint-2/3-mandatory-implement/3-to-pounds.js
@@ -7,7 +7,7 @@
7
8
9
function toPounds(penceString) {
10
-const penceStringWithoutTrailingP = penceString.substring(
+ const penceStringWithoutTrailingP = penceString.substring(
11
0,
12
penceString.length - 1 // to remove the trailing 'p'
13
);
@@ -22,7 +22,7 @@ const pence = paddedPenceNumberString
22
.substring(paddedPenceNumberString.length - 2) // the last two characters
23
.padEnd(2, "0"); // in case there is only one character of pence
24
25
-return `£${pounds}.${pence}`;
+ return `£${pounds}.${pence}`;
26
}
27
28
console.log(toPounds("399p")); // should log "£3.99"
0 commit comments