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
// The issue might be that the input to the function is str but also there is a variable declaration str inside it
3
3
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(str){
7
+
functioncapitalise("hello"){
8
8
letstr=`${str[0].toUpperCase()}${str.slice(1)}`;
9
9
returnstr;
10
10
}
11
11
12
-
// =============> write your explanation here
13
-
// =============> write your new code here
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