Skip to content

Commit 1919573

Browse files
committed
edited answer to 1-percentage-change.js to include explanation for removing the ,
1 parent ae59e28 commit 1919573

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sprint-1/3-mandatory-interpret/1-percentage-change.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ console.log(`The percentage change is ${percentageChange}`);
2020
// d) Identify all the lines that are variable declarations
2121
// lines 1, 2, 7 and 8 are variable declarations
2222
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
23-
// This expression is replacing the , in '10,000' with nothing - essentially removing it
23+
// This expression is replacing the , in '10,000' with nothing - essentially removing it. Number() function can then convert the string into a number, allowing it to be used in calculations such as finding the price difference and percentage change.

0 commit comments

Comments
 (0)