Chapter 4. Variables
i = 2;
And the following line adds 3 to i and assigns the result to a new variable, sum:
var sum = i + 3;
4.1. Variable Typing
i = 10; i = "ten";
In C, C++, Java, or any other strongly typed language, code like this is illegal.
Copyright © 2003 O'Reilly & Associates. All rights reserved.