Skip to content

Commit e02e2e7

Browse files
updated the function to replace all the spaces between words with"_"
1 parent b9c50c9 commit e02e2e7

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
@@ -18,6 +18,6 @@
1818
function convertToSnakeUpperCase(str){
1919
// const upper=str.toUpperCase();
2020
// const snake=upper.replace(" ","_");
21-
return str.toUpperCase().replace(" ", "_");
21+
return str.toUpperCase().replaceAll(" ", "_");
2222
}
23-
console.log(convertToSnakeUpperCase("hello there"));
23+
console.log(convertToSnakeUpperCase("hello there buddy"));

0 commit comments

Comments
 (0)