Products List

by Lucille Kenney

JavaScript

var products = ["paint brush",
			 "sketch pad",
			 "paints"
];

var costs = [19.99,
			 10.99,
			 12.99,
];

products.push("fountain pen", "ink well", "pencil");
costs.push(32.99, 16.99, 1.99);

products.push("book");
costs.push(8.99);

products.sort();

function listProducts() {
	for(var i = 0; i < products.length; i++) {
		console.log(products[i] + " is $" + costs[i]);
	}
}

listProducts();