Skip to content

Commit fdcbeb0

Browse files
committed
Clarify explanation for paddedPenceNumberString processing in 3-to-pounds.js
1 parent 2baa16a commit fdcbeb0

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
@@ -34,7 +34,7 @@ console.log(`£${pounds}.${pence}`);
3434
// 3. const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0");
3535
// penceStringWithoutTrailingP is now '399'
3636
// padStart(3, "0") is a method used above which guarantees that the numeric string is at least 3 characters long, and if it is shorter add '0' to the front until it is 3 characters long.
37-
// padding to 3 ensures there is always at least one pounds digit and two pence digits.
37+
// padding to 3 ensures there is always at least 3 digits, that is, one pounds digit and two pence digits.
3838
//
3939

4040
// 4. const pounds = paddedPenceNumberString.substring(0, paddedPenceNumberString.length - 2);

0 commit comments

Comments
 (0)