Skip to content

Commit 6457b6e

Browse files
author
alexf1225
committed
Story 1: Fixed formatting
1 parent 90226ce commit 6457b6e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cb_SwapCase.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//Using the JavaScript language, have the function SwapCase(str) take the str parameter and swap the case of each character. For example: if str is "Hello World" the output should be hELLO wORLD. Let numbers and symbols stay the way they are.
2+
13
function SwapCase(str) {
24

35
// code goes here
@@ -14,6 +16,6 @@ function SwapCase(str) {
1416

1517
}
1618

17-
// keep this function call here
18-
// to see how to enter arguments in JavaScript scroll down
19-
print(SwapCase(readline()));
19+
// My test
20+
var str = "Sup DUDE!!?";
21+
console.log(SwapCase(str)); //solution: "sUP dude!!?"

0 commit comments

Comments
 (0)