June 2014
Intermediate to advanced
696 pages
38h 52m
English
You use arithmetic operators to perform operations between variable and direct values. Table 2.1 shows a list of the arithmetic operations, along with the results that are applied.
Table 2.1 JavaScript’s arithmetic operators, with results based on y=4 initially
Note
You can also use the + operator to add strings or to add strings and numbers together. It allows you to quickly concatenate strings as well as add numerical data to output strings. Table 2.1 shows that when you add a numerical value and a string value, the numerical value is converted to a string and then the two strings are concatenated.
Read now
Unlock full access