We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b31a586 commit 9fede25Copy full SHA for 9fede25
1 file changed
Sprint-2/1-key-errors/0.js
@@ -1,5 +1,6 @@
1
// Predict and explain first...
2
// =============> write your prediction here
3
+//the function is there for capitalise the given string
4
5
// call the function capitalise with a string input
6
// interpret the error message and figure out why an error is occurring
@@ -9,5 +10,11 @@ function capitalise(str) {
9
10
return str;
11
}
12
13
+console.log(capitalise("hello"))
14
// =============> write your explanation here
15
+ // Identifier 'str' has already been declared - means the variable already exist - with the let you don't need to declare this again
16
// =============> write your new code here
17
+ //function capitalise(str) {
18
+ // str = `${str[0].toUpperCase()}${str.slice(1)}`;
19
+ //return str;
20
+ //}
0 commit comments