Last active
March 31, 2021 07:19
-
-
Save chinel/edf96b3033d1536ac0ac93bdbe6cd3e0 to your computer and use it in GitHub Desktop.
Check if a string begins with Capital Letter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const validateString = (value) => { | |
const FIRST_LETTER = value[0]; | |
return FIRST_LETTER === FIRST_LETTER.toUpperCase(); | |
} | |
console.log(validateString("Mart")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment