If (Array.isArray(obj) {
return obj.map(formatObj).join('/n');
}
return JSON.stringify(obj);
}
Is this a form of overloading?
Or does it not qualify as overloading since, it uses only 1 implementation?
That's a condition?
If this doesn't qualify as a form of overloading. By definition, it at least fit the definition of polymorphism right?
Обсуждают сегодня