how to annul equal uppercase to lowercase in javascript code example
Example 1: compare string camelcase and lowercase javascript
str.toUpperCase() === str || str.toLowerCase() === str;
Example 2: compare string camelcase and lowercase javascript
function sameCase(str) {
return /^[A-Z]+$/.test(str) || /^[a-z]+$/.test(str);
}