• Ah, so does naming the variables at the beginning only load them once?

    Any code outside functions is only executed once - when app starts.

    Would I be better off naming '''var d = new Date();''' and such at the beginning, outside of my draw functions?

    Usually it's better to keep variable inside function if that is possible, i.e. var d = new Date(); should be inside function.

    But those images might be an exception if loading them from storage is too slow.


Avatar for malaire @malaire started