🔘prefer-string
JS ⟩ value ⟩ type ⟩ conversion ⟩ object -> primitive ⟩ prefer-string
- prefer-string:preferring a string (if conversion is possible) 
- ⛔ "prefer-string" may result in ⛔️ TypeError❗ 
- Object.prototype.toString() - object to string. 
- Object.prototype.valueOf() - object to (primitive) value, if exists. 
Last updated
Was this helpful?