Skip to content

Commit 09ae242

Browse files
committed
Made code more concise.
1 parent 47508e8 commit 09ae242

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
// We cannot have two declarations of the same variable so we remove the let inside .capitalise.
2727
// =============> write your new code here
2828
function capitalise(str) {
29-
str = `${str[0].toUpperCase()}${str.slice(1)}`;
30-
return str;
29+
return `${str[0].toUpperCase()}${str.slice(1)}`;
3130
}
3231
console.log(capitalise("frankocean"))

0 commit comments

Comments
 (0)