🔘no preference
JS ⟩ value ⟩ type ⟩ conversion ⟩ object -> primitive ⟩ no-preference
no-preference:classes choose their own preference.
⛔ object -> primitive conversion may result in ⛔️ TypeError❗
Object.prototype.toString() - object to string.
Object.prototype.valueOf() - object to (primitive) value, if exists.
Last updated
Was this helpful?