Skip to content

Commit 906778c

Browse files
author
Payman IB
committed
Remove redundant comments and clarify the capitalise function implementation
1 parent cd942b8 commit 906778c

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
@@ -13,7 +13,6 @@
1313
// as the variable in side the function has the same name as the function variable.
1414
// =============> write your new code here
1515
function capitalise(str) {
16-
let str1 = `${str[0].toUpperCase()}${str.slice(1)}`;
17-
return str1;
16+
return `${str[0].toUpperCase()}${str.slice(1)}`;
1817
}
1918
console.log(capitalise("abcd"));

0 commit comments

Comments
 (0)