Demystifying JavaScript Variable Scope and Hoisting

“In the code above we saw that the function declaration takes precedence over the variable declaration.”

This does not appear to be reliable behavior. For example, running the JS Bin succeeds as expected on Chrome, but on Firefox 34.0 on OS X it produces ‘TypeError: showState is not a function’.