var a = "the letter a";
var obj = {};
obj.brovo = "the letter b";
obj.charlie = "the letter c";
if (!obj.alpha) obj.alpha = a;
Since I wish to use this at different points in my code and will be using it multiple times I wish for it to be used as the following:
isNotSet(obj.alpha, a);
I wish this to equate obj.alpha = a;
I started with the following function:
function isNotSet (arg1, arg2) {
if (!arg1) arg1 = arg2;
return arg1;
}