Skip to content

Commit 5cf8a5a

Browse files
Refactor upperSnakeCase using method chaining
1 parent 52a1b76 commit 5cf8a5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
1717

1818
function upperSnakeCase(str){
19-
str = str.toUpperCase()
19+
str.toUpperCase()
2020

21-
return str.replaceAll(" " , "_");
21+
return str.toUpperCase().replaceAll(" " , "_");
2222
;
2323

2424
}

0 commit comments

Comments
 (0)