Javascript
100 Front End Interview Questions Challenge

Coercion

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 

JavaScript will implicitly convert, or 'coerce', Numbers to Strings if you try to join them to a String with the addition operator: 5 + '7' = '57'

You can also explicitly coerce a value into a different type by using the type constructors: Boolean(), Number(), and String().

 

I finished! On to the next chapter