This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function casefilter(input) { | |
let inparray = input.split(""); // creates array of chars | |
let lower = ""; // string of lowercase characters | |
let upper = ""; // string of uppercase characters | |
for (let i = 0; i < inparray.length; i++) { | |
let str = inparray[i].toString(); | |
let fixedstr = str.toUpperCase(); | |
if (str == " ") { // leave spaces separating words | |
upper += str; | |
lower += str; |