consider these slightly two different versions of hoisting...
mylocation = \"dublin\" function outputPosition() { alert(mylocation); mylocation = \"fing
The output of first snippet must be "dublin" and "fingal" provided that mylocation is defined,otherwise its a reference error.
For more details :
http://bustingseams.blogspot.in/2009/08/another-javascript-pitfall-hoisting.html