Skip to content

Commit 47731fb

Browse files
committed
Updated code
1 parent 5594031 commit 47731fb

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

challenge2.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ function caseChanger(str) {
22
var arr = str.split('');
33
var result = '';
44
for (var i = 0; i < arr.length; i++) {
5-
if(i % 2 != 0) {
5+
if (i % 2 != 0)
66
result += arr[i].toUpperCase();
7-
}else{
7+
else
88
result += arr[i].toLowerCase();
9-
}
109
}
1110
return result;
1211
}

0 commit comments

Comments
 (0)