Skip to content

Instantly share code, notes, and snippets.

@3200pro
Last active July 26, 2022 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3200pro/69b002b5b389c6a5cdb3ac2ea05c9b81 to your computer and use it in GitHub Desktop.
Save 3200pro/69b002b5b389c6a5cdb3ac2ea05c9b81 to your computer and use it in GitHub Desktop.
Get the number of characters in a string
const characterCount = (str, char) => str.split(char).length - 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment