Skip to content

Commit dcfb916

Browse files
we start the substring from 0 index to length-2 and store the remaining part of the string as the pound. in 3 to pounds we take out the 2 character and store the remaining part of the string as the pound.
1 parent 8d19a7a commit dcfb916

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Sprint-2/3-mandatory-interpret/3-to-pounds.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const pounds = paddedPenceNumberString.substring(
1212
0,
1313
paddedPenceNumberString.length - 2
1414
);
15-
// we take out the 2 character and store the remaining part of the string as the pound.
15+
// In this we store the first index number into pound and remaining other should be removed. for example, 399 we stored the 3 into Pounds variables and remaining 99 should be removed because the substring start from 0 index to length-2.
1616

1717
const pence = paddedPenceNumberString
1818
.substring(paddedPenceNumberString.length - 2)

0 commit comments

Comments
 (0)