Working with String Arrays

Up to this point, all the arrays we’ve dealt with have consisted of Booleans or numbers. As our final Bingo-related example, Script 3.13 combines everything we’ve done previously with a string array to create the popular “Buzzword Bingo” game.

Script 3.13. A private game of Buzzword Bingo will liven up that next deadly dull staff meeting—just add your own text strings
var buzzwords = new Array ("Aggregate",
					"Bleeding edge",
					"Design pattern",
					"Long tail",
					"Open social",
					"Scalable", ...

Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.