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 352f54e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: Sprint-3/1-key-errors/0.js
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,19 @@
5
5
// interpret the error message and figure out why an error is occurring
6
6
7
7
functioncapitalise(str){
8
-
letstr=`${str[0].toUpperCase()}${str.slice(1)}`;
9
-
returnstr;
8
+
letstr=`${str[0].toUpperCase()}${str.slice(1)}`;
9
+
returnstr;
10
10
}
11
11
12
12
// =============> write your explanation here
13
+
// The function parameter declares the variable string in the first line and then the variable is declared again using let. This will not run because you cannot declare a variable with the same name twice.
14
+
// The return returns the same variable making the funtion useless.
0 commit comments