Javascript: Example callback functions - anonymous function