How are different data types treated in JavaScript?

Different sequences can produce different results: In the first example, JavaScript treats 16 and 4 as numbers, until it reaches “Volvo”. In the second example, since the first operand is a string, all operands are treated as strings. JavaScript has dynamic types. This means that the same variable can be used to hold different data types:
For More Information Please Refer:

You May Also Like to Read: