summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2014-10-28 12:08:06 +0200
committerAdam Bard <github@adambard.com>2014-10-28 12:08:06 +0200
commit9c9abd1c317d3c1e775311488ade89f601915129 (patch)
treea1077c169f7d39ef0dfe0159ddbd2b3668f5c3df
parente126fec97239f3c62f8f50a338d4a8d8b03702d7 (diff)
parenteb43eb7ccdeaad7440d9fda90128691effda15e1 (diff)
Merge pull request #831 from isomorphisms/patch-4
basic arithmetic *doesn't* work
-rw-r--r--javascript.html.markdown7
1 files changed, 4 insertions, 3 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown
index cc210c4a..792cab98 100644
--- a/javascript.html.markdown
+++ b/javascript.html.markdown
@@ -39,13 +39,14 @@ doStuff()
// 1. Numbers, Strings and Operators
// JavaScript has one number type (which is a 64-bit IEEE 754 double).
-// As with Lua, don't freak out about the lack of ints: doubles have a 52-bit
-// mantissa, which is enough to store integers up to about 9✕10¹⁵ precisely.
+// Doubles have a 52-bit mantissa, which is enough to store integers
+// up to about 9✕10¹⁵ precisely.
3; // = 3
1.5; // = 1.5
-// All the basic arithmetic works as you'd expect.
+// Some basic arithmetic works as you'd expect.
1 + 1; // = 2
+.1 + .2; // = 0.30000000000000004
8 - 1; // = 7
10 * 2; // = 20
35 / 5; // = 7