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
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,10 @@
2
2
3
3
// Why will an error occur when this program runs?
4
4
// =============> write your prediction here
5
-
// Answer
6
-
// An error will occur when the program runs because a variable cannot be redeclared.
7
-
// The parameter decimalNumber is already a declared variable, so it cannot be redeclared again.
5
+
// Prediction
6
+
// An error will occur when the program runs because a variable cannot be redeclared.
7
+
// The parameter "decimalNumber" is already a declared variable, so it cannot be redeclared again using const decimalNumber = 0.5; inside the same function.
8
+
8
9
9
10
// Try playing computer with the example to work out what is going on
0 commit comments