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 9fd849a commit 8073d0bCopy full SHA for 8073d0b
Sprint-1/3-mandatory-interpret/3-to-pounds.js
@@ -25,3 +25,13 @@ console.log(`£${pounds}.${pence}`);
25
26
// To begin, we can start with
27
// 1. const penceString = "399p": initialises a string variable with the value "399p"
28
+
29
+// 2.line 3-6 function is trying to remove the p and make the strings numeric only.
30
31
+// 3.line 8 ensure there are three characters and can split equally to pounds and pence.
32
33
+// 4.line 9-12 this is extracting pounds from the number.
34
35
+// 5.line 14-16 ensure the pence always have 2 digits.
36
37
+// line 18 gives the value in pounds and pence.
0 commit comments