JavaScript - Difference Between Runtime And Parse Time

javascript

// JavaScript - Difference between run-time and parse-time:
<script>
// Run-Time function declaration 
foo(); // Calling foo function here will give an Error
var foo = function(){ 
  console.log("Hi I am inside Foo");
}; 
</script>
<script>
// Parse-Time function declaration 
bar(); // Calling foo function will not give an Error
function bar(){ 
  console.log("Hi I am inside Foo");
}; 
</script>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License