A common pitfall is when you know about hoisting but expect an expression to also be hoisted. See hoisted1 is a function declaration and gets hoisted. hoisted2 is a variable declaration and gets hoisted but the expression does not. Futher, hoisted2’s expression value is not computed and made available until after it’s original place in the script.
If you need help solving your business problems with software read how to hire me.