I have a javascript file that sets the value of constants using namespace.
var DB = DB || {};
DB.Something = {
var1 = "value1",
var2 = "value2",
var3 = "value3"
};
Now, sometimes the value for DB.Something.var2
and DB.Something.var3
comes as undefined
. What can be the possible issue?