Skip to content

Commit 361a9e7

Browse files
committed
Clarify explanation for substring method in pounds extraction in 3-to-pounds.js
1 parent c524311 commit 361a9e7

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
@@ -40,7 +40,7 @@ console.log(`£${pounds}.${pence}`);
4040
// 4. const pounds = paddedPenceNumberString.substring(0, paddedPenceNumberString.length - 2);
4141
// since paddedPenceNumberString is '399' and it's '.length' is 3
4242
// this line is saying: '399.substring(0, 3 - 2)', which becomes '399.substring(0, 1)'
43-
// 'substring' is a method used to grab characters from a string, starting from the left, from position '0' up to, but not including, position '1'
43+
// 'substring' is a method used to grab characters from this string, starting from the left, from position '0' up to, but not including, position '1'
4444
// 'const pounds' would be assigned the new value: '3'
4545

4646
// 5. const pence = paddedPenceNumberString.substring(paddedPenceNumberString.length - 2).padEnd(2, "0");

0 commit comments

Comments
 (0)