@@ -15,21 +15,21 @@ console.log(`The percentage change is ${percentageChange}`);
1515/* there has five function in line 4 and and console . log also has one
1616line 4 and 5 has two Number() function
1717line 4 and 5 has two replaceALL() function
18- line 10 has one console . log ( )
18+ line 10 has one console . log ()*/
1919
2020/* 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?
21- In line five error shown in replaceAll ( "," "")); missing comma before last two comma(" , "," ") .
21+ In line five error shown in replaceAll("," "")); missing comma before last two comma(",","").*/
2222
2323/* c) Identify all the lines that are variable reassignment statements
2424line 4 carPrice = Number(carPrice.replaceAll(",", ""));
2525line 5 priceAfterOneYear = Number(priceAfterOneYear.replaceAll(",", ""));
26- As per the carPrice and priceAfterOneYear has been declared in line 1 and 2 by using let variable .
26+ As per the carPrice and priceAfterOneYear has been declared in line 1 and 2 by using let variable.*/
2727
2828/*d) Identify all the lines that are variable declarations
2929line 1 let carPrice = "10,000";
3030line 2 let priceAfterOneYear = "8,543";
3131line 7 const priceDifference = carPrice - priceAfterOneYear;
32- line 8 const percentageChange = ( priceDifference / carPrice ) * 100 ;
32+ line 8 const percentageChange = (priceDifference / carPrice) * 100;*/
3333
3434/* e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
35- replaceALL throwout all the commas from the string and number became numerical value .
35+ replaceALL throwout all the commas from the string and number became numerical value.*/
0 commit comments