🔰converting objects
convert an object to other forms.
obj.toString() // object -> string
obj.toLocaleString() // localization
obj.valueOf() // object -> primitive (typically, number)
obj.toJSON() // customization method used by JSON.stringify()
Last updated
Was this helpful?