Using Operators with Different Types
Explore how JavaScript operators function with various variable types, including strings and null values. Learn about type coercion, where JavaScript converts types to perform operations, and understand the concept of NaN when invalid math occurs. This lesson helps you grasp key operator behaviors and type interactions in JavaScript.
We'll cover the following...
We'll cover the following...
Different Variable Types
We’ve shown these operators being used on numbers only. They can also be used with other variable types.
String addition just joins the strings together into a new, larger string.
NaN
What happens if we try to use the other operators with strings? We get a ...
Ask