2 ms·
I found the C# link in the article to be tenuous at best. JavaScript doesn't have namespaces or classes, so yes, obviously you'll need to do without them. Globa
by pmjordan 16y ago
I found the C# link in the article to be tenuous at best. JavaScript doesn't have namespaces or classes, so yes, obviously you'll need to do without them. Global variables are discouraged in C# - in contrast, uh, avoid global variables in JavaScript? Likewise, I wouldn't call creating objects using a constructor a "best practice" if that's the only way to do it in the language. Besides, there is a time and place for using new, even in JavaScript, mainly for creating functionality-heavy objects with a prototype. (as opposed to data containers)