Skip to content

Commit 6c105ea

Browse files
committed
variable reassignmentstatements
1 parent ec2d5c8 commit 6c105ea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ console.log(`The percentage change is ${percentageChange}`);
2121

2222
// b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem?
2323
//priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
24+
//priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," "")); missing a comma between the two arguments of replaceAll()
2425

2526
// c) Identify all the lines that are variable reassignment statements
26-
//priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," "")); missing a comma between the two arguments of replaceAll()
27+
//carPrice = Number(carPrice.replaceAll(",", ""));
28+
//priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", ""));
2729

2830
// d) Identify all the lines that are variable declarations
2931
// let carPrice = "10,000";

0 commit comments

Comments
 (0)