Skip to content

Commit 8073d0b

Browse files
Validate the descriptions introduced.
1 parent 9fd849a commit 8073d0b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Sprint-1/3-mandatory-interpret/3-to-pounds.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ console.log(`£${pounds}.${pence}`);
2525

2626
// To begin, we can start with
2727
// 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

Comments
 (0)