Skip to content

Commit 364b18d

Browse files
committed
1-key-errors 0.js updated code to return value without declaring the variable
1 parent 61a12b3 commit 364b18d

File tree

1 file changed

+1
-2
lines changed
  • Sprint-2/1-key-errors

1 file changed

+1
-2
lines changed

Sprint-2/1-key-errors/0.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
// =============> write your new code here
3838

3939
function capitalise(str) {
40-
str = `${str[0].toUpperCase()}${str.slice(1)}`;
41-
return str;
40+
return `${str[0].toUpperCase()}${str.slice(1)}`;
4241
}
4342
console.log(capitalise("justice"));
4443

0 commit comments

Comments
 (0)