Skip to content

Commit 7deb9ec

Browse files
committed
pound.js update
1 parent ed06b15 commit 7deb9ec

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Sprint-1/3-mandatory-interpret/3-to-pounds.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ const pence = paddedPenceNumberString
2020
// console.log(pence)
2121
console.log(${pounds}.${pence}`);
2222

23+
// This program takes a string representing a price in pence
24+
// The program then builds up a string representing the price in pounds
25+
26+
// You need to do a step-by-step breakdown of each line in this program
27+
// Try and describe the purpose / rationale behind each step
28+
29+
// To begin, we can start with
2330
// 1. const penceString = "399p": initialises a string variable with the value "399p"
2431
// 2. const penceStringWithoutTrailingP = penceString.substring(0, penceString.length-1): this
2532
// variable creates a new string that cuts the penceSting to 399,so it basically creates a new

0 commit comments

Comments
 (0)