Answers for "count particular letter in string js"

2

js character certain count

var str = "Hello Lewes";
var ch = 'e';
 
var count = str.split("e").length - 1;
console.log(count);
 
/*
    Output: 3
*/
Posted by: Guest on October-09-2020

Code answers related to "count particular letter in string js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language