Skip to content

Commit d27c7d8

Browse files
committed
Add variable capitaliseStr instead of changing original string
1 parent ab74a01 commit d27c7d8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
// =============> write your new code here
1818

1919
function capitalise(str) {
20-
str = `${str[0].toUpperCase()}${str.slice(1)}`;
21-
return str;
20+
const capitaliseStr = `${str[0].toUpperCase()}${str.slice(1)}`;
21+
return capitaliseStr;
2222
}

0 commit comments

Comments
 (0)