Ⓜ️.valueOf()
🚧 under construction
Last updated
🚧 under construction
Last updated
JS ⟩ value ⟩ type ⟩ conversion ⟩ .valueOf()
in order for valueOf to be useful during type conversion, it must return a primitive.
all primitive types have their own custom valueOf methods.
valueOf vs. toString
valueOf is called in priority by numeric conversion and primitive conversion.
string conversion calls toString() in priority.