Here is my class A, and I want all options to be optional. It works fine for properties a, b, c, but does not work for c.cX properties. How to do it right to make all properties optional?
var Options;
var A = function(options) {
console.log(this);
};
new A({
a: 'x',
c: {
ca: 'x',
cc: function() {}
}
});
source
share