File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
Sprint-1/3-mandatory-interpret Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ console.log(`£${pounds}.${pence}`);
2424// Try and describe the purpose / rationale behind each step
2525
2626// To begin, we can start with
27- // 1. const penceString = "399p": initialises a string variable with the value "399p",p means pence so 399p means 399 pence.
27+ // 1. const penceString = "399p": declare string variable with the value "399p" assigned ,p means pence so 399p means 399 pence.
2828
2929// 2.const penceStringWithoutTrailingP = penceString.substring(0, penceString.length - 1);Removes the trailing "p" from the string.
3030// .substring(0, length - 1) means: take all characters except the last one.Result: "399",which will get only the numeric part of the price.
You can’t perform that action at this time.
0 commit comments