Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
all_upper_ii solution in Clear category for All Upper II by Jon_Red
import assert from'assert';
function isAllUpper(text:string):boolean{
return text.match(/[A-Z]+/i)?text.toUpperCase()===text:false;
}
// self-checks
assert.equal(isAllUpper('ALL UPPER'),true);
assert.equal(isAllUpper('all lower'),false);
assert.equal(isAllUpper('mixed UPPER and lower'),false);
assert.equal(isAllUpper(''),false);
July 28, 2020