Skip to content

Commit 105bbf8

Browse files
committed
Add explanation for pence calculation in 3-to-pounds.js
1 parent fdcbeb0 commit 105bbf8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,6 @@ console.log(`£${pounds}.${pence}`);
4848
// then 'paddedPenceNumberString.substring(3 - 2)' becomes 'paddedPenceNumberString.substring(1)': this means grab everything from position '1' of the string to the end.
4949
// That is -> '399.substring(1)' becomes '99'
5050
// '.padEnd(2, "0") is another method that ensures the string is at least 2 characters long and adding '0' to the end if it's too short.
51-
// 'const pence' would be assigned the new value: '99'
51+
// 'const pence' would be assigned the new value: '99'
52+
53+
// 6. console.log(`$)

0 commit comments

Comments
 (0)