Code to go logo
Created using Figma
Use Cases
Contribute
How to get count of character in string in JavaScript
Strings
By Jad Joubran ·
Last updated Feb 16, 2018
const name = "Jad Joubran"; const countJ = name.split("J").length - 1;
2
Feb 16, 2018
1
Jad Joubran
See answer
1
Jad Joubran
String.split
on MDN
Learn JavaScript step by step