COMP 20: Web Programming

JavaScript Objects and Functions

JavaScript Object

Hashes a.k.a. Dictionaries a.k.a. Associative Arrays a.k.a. Finite Map

	o = new Object;
	o['a'] = 5;
	o[7] = [1,2,3];
	o['hi'] = {'hello':'there', 'yo':'man'};
	console.log(o['a']);
	console.log(o[7]);
	console.log(o['hi']['hello']); 

So What About JavaScript Functions?