---
title: "JavaScript: Numbers"
date: 2013-02-02
description: "When you"
canonical_url: https://idratherbewriting.com/numbers-javascript/
---
# JavaScript: Numbers
When you're working with numbers, it's important to understand addition versus concatenation. Addition gives you the sum of two numbers, whereas concatenation just joins or "sandwiches" the two values together.

For example, here's addition:

The result would be 15.

However, if one of the values is a string rather than a regular number, the result will be concatenated instead of added. A string is identified by quotations; numbers do not have quotations.

The result would be 105. The two values get joined together.

## Not a Number (NaN)

If you try to multiply a string by a number, the result will be `NaN`, which means "Not a Number."

You would see `NaN` if you tried to run something like this: