Type Coercion
JavaScript automatically converts between types in certain situations. This is called type coercion.
Implicit Coercion
Loading JavaScript Playground...
Explicit Type Conversion
Loading JavaScript Playground...
Common Gotchas
Loading JavaScript Playground...
typeof Operator
Loading JavaScript Playground...
Exercise: String to Number
Convert a string price to a number and calculate total:
Loading JavaScript Exercise...
Exercise: Type Check
Check the type of several values:
Loading JavaScript Exercise...
Up next · Lesson 10 of 37
Arithmetic Operators
1 min read
9 of 37 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

