Course contentsShow
JavaScript
Lesson 294 of 2,7238. Type CoercionPro lesson

Subtracting Strings

How the - operator coerces strings to numbers, making '5' - '2' work but producing NaN on failure.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.