I think I can safely say that nobody understands quantum mechanics.” Richard Feynman
A resource for web developers a code snippet library with step by step tutorials.

a resource for web developers...

       

Search Amazon

JavaScript: Strings tutorial code snippet 6.

 

Up Up to JavaScript: Strings overview page

 

 

A form to count the occurrence of a character in a string.

Uses the String object method 'charAt()' with an 'if statement' nested in a 'for loop'.

 





Output view



Back to top

 

Bookmark and Share

 

Copyright © 2006-2012 justfigures.co.uk