Is this the correct way to check for a missing parameter in a function? Would this work in all browsers? How about IE?
function getName(name){ name = name !=
Yes this would work in all browsers though if you want to see if it is defined you might use:
function getName(name){ name = typeof(name) !== "undefined" ? name : "default"; return name; }