There was an error while loading. Please reload this page.
1 parent 3a5af8c commit c2075baCopy full SHA for c2075ba
1 file changed
Sprint-2/3-mandatory-interpret/3-to-pounds.js
@@ -24,7 +24,6 @@ console.log(`£${pounds}.${pence}`);
24
// Try and describe the purpose / rationale behind each step
25
//this function penceString.length-1 removes the last p from string so it values 3 because it contains 4 characters minues 1.
26
//penceString.substring(0, 3) and it takes the characters from position 0 up to, but not including, position 3.
27
-//const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0");
28
//const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0");This uses padStart() to make sure the string has at least 3 characters.
29
//const pounds = paddedPenceNumberString.substring(0, paddedPenceNumberString.length - 2);
30
//This line extracts the pounds part.
0 commit comments