| Programming C# C++ (7) Delphi (617) Java (8) JavaScript (31) Document (8) Events (8) ExtJS (9) Strings (3) perl (9) php (4) VBScript (1) Visual Basic (1) New related comments Number of comments in the last 48 hours How to prompt the user with an inputbox in Javascript |
Introducing namespaces into Javascript
Question: How to avoid variable overlap problems (stepping on the fellow engineers' toes)Answer: Use namespaces as shown below. Make all functions members of an object - here named pt_scope - that is instantiated exactly one time. Then call functions as members of this global object.
Comments:
| ||||||||||||||||||