jQuery 1.4.2, HTML, CSS, JavaScript
jQuery 1.9.1, HTML, CSS, JavaScript
This code counts how often the word ‘Sam’ appears in an Array: