Tag Archives: Namespace

Creating namespaces in JavaScript

In the past it was very common to see global variables in snippets of JavaScript code across the web, such as: name = "Spock"; function greeting() { return "Hello " + name; } A better approach is to place all of your code within a namespace; an object that contains all of your code and [...]
Posted in JavaScript | Tagged | Comments closed