Skip to content

Commit f5c1935

Browse files
author
JorvanW
committed
changed to first letter of the function to lowercase and added code to replace all spaces with underscores
1 parent 8aa69c9 commit f5c1935

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Sprint-2/3-mandatory-implement/2-cases.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
// Use the MDN string documentation to help you find a solution
1616
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
1717

18+
function capitalise(inputString) {
19+
return inputString.toUpperCase().replaceAll(" ", "_");
20+
}
1821

19-
function Capitalise(inputString) {
20-
return inputString.toUpperCase()
21-
22-
}
23-
24-
Console.log(Capitalise("hello there"));
22+
Console.log(capitalise("hello there"));

0 commit comments

Comments
 (0)