We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b194a5 commit 75b0d32Copy full SHA for 75b0d32
Sprint-2/3-mandatory-implement/2-cases.js
@@ -14,3 +14,15 @@
14
// You will need to come up with an appropriate name for the function
15
// Use the MDN string documentation to help you find a solution
16
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
17
+
18
+function capSnakeCase(str) {
19
+ const upper = str.toUpperCase();
20
+ const snake = upper.replace(/ /g, "_");
21
+ return snake;
22
+}
23
+console.log(capSnakeCase("lord of the rings"));
24
25
+// step 1: get a string input
26
+//step 2: change the upper case
27
+//step 3: replace spaces with underscores
28
+// step 4: return capSnakeCase
0 commit comments