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/0.js
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,5 +9,10 @@ function capitalise(str) {
9
9
returnstr;
10
10
}
11
11
12
-
// =============> write your explanation here
12
+
// =============> SyntaxError: Identifier 'str' has already been declared. This error occurs because the variable 'str' is being declared again within the function,
13
+
// which is not allowed. To fix this, we can simply remove the 'let' declaration.
0 commit comments