Skip to content

Commit 4b1680e

Browse files
in this the last two digits are saved and index 0 is removed.
1 parent 85a99f4 commit 4b1680e

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
@@ -17,7 +17,7 @@ const pounds = paddedPenceNumberString.substring(
1717
const pence = paddedPenceNumberString
1818
.substring(paddedPenceNumberString.length - 2)
1919
.padEnd(2, "0");
20-
// At last we get the last two characters as the pence.
20+
// At last we get the last two characters as the pence and first one or index 0 is removed .
2121

2222
console.log(`£${pounds}.${pence}`);
2323
//We can display the price of pound and pence like £3.99.

0 commit comments

Comments
 (0)