You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sprint-3/1-key-errors/1.js
+5-11Lines changed: 5 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3,26 +3,20 @@
3
3
// Why will an error occur when this program runs?
4
4
// =============> write your prediction here D: Answer => variable decimalNumber is declared twice : one time in the parameter and another time inside the function
5
5
6
-
7
6
// function convertToPercentage(decimalNumber) {
8
7
// //const decimalNumber = 0.5;
9
8
// const percentage = `${decimalNumber * 100}%`;
10
-
11
9
// return percentage;
12
10
// }
13
11
14
12
// console.log(decimalNumber);
15
-
16
13
// =============> write your explanation here
17
14
// solution :Also in line 15 console.log is trying print a variable which is not defined instead of calling the function convertToPercentage .
0 commit comments