Skip to content

Commit 1b143ad

Browse files
committed
update - explaining error msg and fix the code
1 parent 65e5b19 commit 1b143ad

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • Sprint-3/1-key-errors

‎Sprint-3/1-key-errors/0.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
//- I changed the variable name to "strg" to avoid the error.
1515
// =============> write your new code here
1616
function capitalise(str) {
17-
let strg = `${str[0].toUpperCase()}${str.slice(1)}`;
18-
return strg;
19-
}
17+
return `${str[0].toUpperCase()}${str.slice(1)}`;
18+
}
19+
console.log(capitalise("abakar"));

0 commit comments

Comments
 (0)