File tree Expand file tree Collapse file tree
Sprint-2/3-mandatory-interpret Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ console.log(`£${pounds}.${pence}`);
3737// the second argument is the end index and it is exclusive, it stops just before that position
3838// length - 1 is 3, so it stops before index 3, dropping the "p" and leaving "399"
3939
40- // Line 8 a variable "paddedPenceNumberString" was created and a function padStart(3, "0")
41- // was used to ensure the value of the variable remains at 3 and to be filled with "0" at the beginning if the value is less 3
40+ // 8. padStart(3, "0") pads the start until the string is at least 3 characters long
41+ // "399" is already 3, so nothing gets added here
4242
4343// Line 9-12 created a variable "pounds" and used the subString(0, paddedPenceNumberString.length - 2 )
4444// to start count from 0 of the "penceStringWithoutTrailingP" value which is 399.
You can’t perform that action at this time.
0 commit comments