Last updated 2 years ago
JS ⟩ value ⟩ type ⟩ conversion ⟩ object -> primitive ⟩ prefer-string
prefer-string:preferring a string (if conversion is possible)
"prefer-string" may result in ⛔️ TypeError
JavaScript: The Definitive Guide ⟩
3.9.2 Explicit Conversions
3.9.3 Object to Primitive Conversions
14.4.7
Object.prototype.toString() - object to string.
Object.prototype.valueOf() - object to (primitive) value, if exists.