JavaScript Operators

Example Assign values to variables and add them together: var x = 5;         // assign the value 5 to x var y = 2;         // assign the value 2 to y var z = x + y;     // assign the value 7 to z (x + y) Try it Yourself » The assignment operator (=) assigns a value to a variable. Assignment var x = 10; Try […]