Tracing or printing using console.log

With Actionscript, it’s easy to see what’s what with

trace("my statement");

The equivalent in Javascript is console.log(“my statement”). You can test out the most basic example:

1. Open Firebug.
2. Type console.log(“hello!”) in the console on the right,
3. Press Run.
4. View results.

Another way to write statements to the console is by writing to the console inside of script tags:

<script type="text/javascript">
console.log('hello!');
</script>

This is useful for testing out jQuery selectors:

<script type="text/javascript">
 $(document).ready(function() {
 $('#my_button').click(function() {
console.log("you clicked the button!");
});
 </script>

Getting started with the Garmin Communicator API

Garmin Communicator API from Nicole Chung on Vimeo.

Recently I purchased a Garmin Forerunner 305. So far, so good, except that on a cloudy day it takes forever to find a satellite. I’ve been using it a lot with dailymile and I was curious to find out how the watch manages to deliver it’s data to the daily mile website…