This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The difference is that functionTwo is defined at parse-time for a script block, whereas functionOne is defined at run-time. For example: | |
<script> | |
// Error | |
functionOne(); | |
var functionOne = function() { | |
} | |
</script> | |
<script> | |
// No error | |
functionTwo(); | |
function functionTwo() { | |
} | |
</script> |
No comments:
Post a Comment