TIL How to check if the string is uppercase
POSTED ON:
How to check if the string is uppercase.
const isUpperCase = str => str === str.toUpperCase();
console.log(isUpperCase("string")); // false
console.log(isUpperCase("STRING")); // true
console.log(isUpperCase("5TR1NG")); // true
REFERENCE:
21 Useful JavaScript Snippets For Everyday Development
Related TILs
Tagged: js