Bank of America lub Capital One

function isUpper(str) {
    return !/[a-z]/.test(str) && /[A-Z]/.test(str);
}

isUpper("FOO"); //true
isUpper("bar"); //false
isUpper("123"); //false
isUpper("123a"); //false
isUpper("123A"); //true
isUpper("A123"); //true
isUpper(""); //false
Web Surfer