diff --git a/guide/english/javascript/numbers/index.md b/guide/english/javascript/numbers/index.md index 8cbb9c7373..50619d0511 100644 --- a/guide/english/javascript/numbers/index.md +++ b/guide/english/javascript/numbers/index.md @@ -68,6 +68,18 @@ foo.toFixed(2); // "47.69" ``` >Type `Number.prototype` in your browser and see other available methods yourself. +Numbers in strings are treated differently than normal numbers. + +```javascript +var foo = "12" + 18; // "1218" +``` +In order to convert a string into a number you must run it through a ```Number()``` function. + +```javascript +var foo = "12"; +var bar = Number(foo) + 18; // "30" +``` + #### More Information: 1. MDN 2. JavaScript Numbers