• + 0 comments
    
    

    function getLetter(s) { let letter; // Write your code here let sOne = "aeiou"; let sTwo = "bcdfg"; let sThree = "hjklm";

    switch(true){
        case (sOne.search(s[0]) != -1):
        letter = "A";
        break;
    
        case (sTwo.search(s[0]) != -1):
        letter = "B";
        break;
    
        case (sThree.search(s[0]) != -1):
        letter = "C";
        break;
    
        default:
        letter = "D";
    }
    
    return letter;
    

    }