You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sprint-2/3-mandatory-implement/2-cases.js
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,7 @@
16
16
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
17
17
18
18
functionmakeUpperCaseSnakeCase(str){
19
-
constresult=str.split(" ").join("_").toUpperCase();//take str, and turn it into an array and then turn it back into a string with underscores then upper case it.
20
-
console.log("result",result);
19
+
// .replaceAll takes the empty space and replaces it with underscore and .toUpperCase makes all the letters capitals.
0 commit comments