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
{{ message }}
Repository navigation
Commit 7916b12
Browse filesBrowse the repository at this point in the historyBrowse files
// Why will an error occur when this program runs?
4
-
// =============> write your prediction here
5
-
4
+
// =============> write your prediction here decimalNumber has already been declared in the function. const can not redeclare a variable with the same name in the same scope. parameter, so we cannot declare it again with const.
5
+
// This will cause a syntax error. To fix this, we should remove the const keyword when assigning the new value to decimalNumber.
6
+
// console.log(decimalNumber); only exists inside the function.
6
7
// Try playing computer with the example to work out what is going on
0 commit comments