A common mistake (?) often seen is people declaring like a zillion GLOBAL variables in their scripts. That might not cause any problems when relying on only 1 script in your page but it will become a problem for sure when you include scripts from colleagues which contain variables with the same name.
RULE 1: always use namespaces in your scripts
Of course i followed this rule as the image below shows.
No comments:
Post a Comment