Additive Operator Group
Addition ( + )
Subtraction ( - )




Navigation Aids -- This Page        Navigation Aids -- This Topic        Navigation Aids -- This Site




Review of Terms Related to This Topic





The Purpose for this Page

This page will show the basic rules for JavaScript additive operator group. In addition, type conversions are discussed where applicable. Some special situation cases are explained. And finally, some scripting examples are provided with comments.





The Basics of Additive Operators





Type conversions





Special Situations





Some Script Examples


Expression Result Comment
10 + 10 20 add two numbers and sum is 20
"to" + "tal" "total" concatenate two strings and result is "total"
"to" + 2 "to2" convert 2 to string "2" and concatenates the two strings
"5" + 2 "52" convert 2 to string "2" and concatenates the two strings
10 - 8 2 subtract two numbers and difference is 2
10 - (-8) 18 same as: 10 + (+8); negate the 2nd operand and add the two numbers


Top            

Rx4AJAX        About Us | Topic Index | Contact Us | Privacy Policy | 2008 This Site Built By PPThompson