Use Implicit and Explicit Coercion in JavaScript

InstructorTyler Clark

Share this video with your friends

Send Tweet

Coercion can be a scary word for many developers today. The inventor of JavaScript himself has publicly stated that some of the rules around coercion is the biggest thing he regrets about JavaScript.

Simply put, coercion is the conversion of one type to another type. It happens implicitly in our code and there are also many ways to explicitly coerce our types. This lesson is designed to show you both types of coercion in action.

Hans Brough
~ 4 years ago

It would be nice to know what are some of the pitfalls of implicit coercion - as in concrete examples of bugs.