Showing posts with label Javascript calling function through a variable. Show all posts
Showing posts with label Javascript calling function through a variable. Show all posts

Monday, 12 May 2014

Javascript calling function through a variable


<script>
var foo = function () {
for (var i = 0; i < 10; i++) {
alert(i);
}
};
foo();
</script>