🚧 under construction
Last updated 2 years ago
Was this helpful?
⟩ ⟩ ⟩ ⟩ .valueOf()
convert to () value, if possible.
in order for valueOf to be useful during , it must return a .
all types have their own custom valueOf methods.
valueOf vs. toString
valueOf is called in priority by and .
calls in priority.
.toString() - object -> string
JavaScript: The Definitive Guide ⟩
3.9.2 Explicit Conversions
14.4.7
- object -> string.
- object -> (primitive) value, if possible.