<script>
function hello(c){
alert(c);
}
// commong calling.
hello('Good Afternoon');
// not call back function. Just alerting the caller function literally;
hello( function(){ alert('Holla'); return 'Good Morning'; } );
// callback and ononymous function. First alerting 'Holla',
// then 'Good Evening'
hello( (function(){ alert('Holla'); return 'Good Evening'; })());
</script>
No comments:
Post a Comment