Skip to main content

Check if a string is upper case

JavaScript version

const isUpperCase = (str) => str === str.toUpperCase();

TypeScript version

const isUpperCase = (str: string): boolean => str === str.toUpperCase();

Comments