Everything posted by TomC
For declaring a primitive value such as (bool , string, number) then the performance difference would be negligible. As the above posters have said, one way has a quicker lookup scope, the other doesn't have to re-declare and initialise the variable. However if the above example was any kind of object, i.e. var speed = [player.xSpeed, player.ySpeed] Then you would definitely declare this outside the update loop and reuse the object for performance.