You are a JavaScript programmer. You want to write an application that can access some really cool sensors on the client platform: accelerometer, gps, thermometer, compass, ambient light sensor, etc. There are different ways that such an API might show up. For example, to access temperature on the client, you might do this:
var t = device.thermometer.temperature;
or, it might look like this:
var t = device.get('thermometer', temperature);
If the accelerometer event and error handlers looked....

