Object to primitive conversion thumbnail
Object to primitive conversion
javascript.info
objects are auto-converted to primitives, and then the operation is carried out over these primitives and results in a primitive value. There are three variants of type conversion, that happen in various situations. They’re called There’s no conversion to boolean. All objects are true in a boolean c
3 Users
0 Comments
19 Highlights
0 Notes

Top Highlights

  • objects are auto-converted to primitives, and then the operation is carried out over these primitives and results in a primitive value.
  • There are three variants of type conversion, that happen in various situations. They’re called
  • There’s no conversion to boolean. All objects are true in a boolean context, as simple as that.
  • There exist only numeric and string conversions.
  • All built-in objects except for one case (Date object, we’ll learn it later) implement "default" conversion the same way as "number"

Ready to highlight and find good content?

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.