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 5124da0 commit f29a1e0Copy full SHA for f29a1e0
Sprint-1/3-mandatory-interpret/3-to-pounds.js
@@ -42,6 +42,6 @@ This line extracts the pounds part by taking all characters except the last two
42
.substring(paddedPenceNumberString.length - 2)
43
.padEnd(2, "0");
44
This line extracts the last two characters (representing pence) and ensures they are exactly two digits long by padding with trailing zeros if necessary, resulting in "99".
45
-
+however the padEnd is not necessary in this case because the substring will alwayes return 2 characters since we have already padded the string to be at least 3 characters long in the previouse Step.
46
6. console.log(`£${pounds}.${pence}`);
47
This line logs the formatted price in pounds and pence, e.g., £03.99.
0 commit comments