Skip to content

Commit 2583b44

Browse files
committed
Update 2- explaining error msg and fix the code
1 parent 1b143ad commit 2583b44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// }
1212

1313
// =============> write your explanation here
14-
//- I changed the variable name to "strg" to avoid the error.
14+
// Instead of storing the formatted string in a new variable and then returning it, I return the expression directly since the variable was only used once.
1515
// =============> write your new code here
1616
function capitalise(str) {
1717
return `${str[0].toUpperCase()}${str.slice(1)}`;

0 commit comments

Comments
 (0)