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
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,15 @@
4
4
// call the function capitalise with a string input
5
5
// interpret the error message and figure out why an error is occurring
6
6
7
-
functioncapitalise("hello"){
8
-
letstr=`${str[0].toUpperCase()}${str.slice(1)}`;
9
-
returnstr;
10
-
}
7
+
// function capitalise("hello") {
8
+
// let str = `${str[0].toUpperCase()}${str.slice(1)}`;
9
+
// return str;
10
+
// }
11
11
12
12
// Uncaught SyntaxError: Identifier 'str' has already been declared - meaning str should not have been used inside the function or the parameter of the function
0 commit comments