Get the count of a text with JavaScript!

Hi Community,

Hope you’ll well!

Here’s how you can get the count of a text! Did it with JS!

Here’s the JS :

var text = "text input";
var count = text.split(/\W/).join('').length;
return count;

( add the text in the text input area )

Here’s a video : text count.mp4 - Google Drive

Hope this helps!

Thank you!

Have a great weekend!

3 Likes

Welcome back

1 Like