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-2/1-key-errors/1.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@
6
6
// Try playing computer with the example to work out what is going on
7
7
8
8
functionconvertToPercentage(decimalNumber){
9
-
constdecimalNumber=0.5;
9
+
//const decimalNumber = 0.5;
10
10
constpercentage=`${decimalNumber*100}%`;
11
11
12
12
returnpercentage;
13
13
}
14
14
15
-
console.log(decimalNumber);
15
+
console.log(convertToPercentage(0.5));
16
16
17
17
// =============> write your explanation here: // the error: identifier `decimalNumber` has already been declared. this error shows that identifier has already been declared and we can not redeclare it again.The identifier `decimalNumber` declared in parameter.//
0 commit comments