Skip to content

Commit 6d81f32

Browse files
committed
described what the expression on line 4 is doing
1 parent 336102c commit 6d81f32

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ console.log(`The percentage change is ${percentageChange}`);
2222
// d) Identify all the lines that are variable declarations
2323
// the variable declarations are on lines 1 and 2 and lines 7 and 8
2424
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
25+
//It is taking the value stored in the variable carPrice and running the method .replaceAll() on the value. so here it is taking 10,000 and removing the comma and then finally this value is turned from a string into a number by being passed into the number function.

0 commit comments

Comments
 (0)