diff options
-rw-r--r-- | javascript.html.markdown | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown index 9c4f06fc..d408e885 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -149,6 +149,10 @@ someOtherVar = 10; // Variables declared without being assigned to are set to undefined. var someThirdVar; // = undefined +// if you wan't to declare a couple of variables, then you could use a comma +// separator +var someFourthVar = 2, someFifthVar = 4; + // There's shorthand for performing math operations on variables: someVar += 5; // equivalent to someVar = someVar + 5; someVar is 10 now someVar *= 10; // now someVar is 100 |