javascript function Hoisting inside block statement