aspxtreme

JavaScript Basics

Abakada ~ Back to Basics


String Operators

In addition to the comparison operators, which can be used on string values, the concatenation operator + joins two string values together, returning another string that is the union of the two operand strings. For example,

var Text1 = "my "
var Text2 = "string"

Thus, the expression Text1 + Text2 returns the string "my string".

The shorthand assignment operator += can also be used to concatenate strings. For example,

var Text1 = "alpha"
Text1 += "bet"

If the variable Text1 has the value "alpha," then the expression Text1 += "bet" evaluates to "alphabet" and assigns this value to Text1.

Operators Summary



Books and more ...

Contents
Overview
JavaScript Components
JavaScript Basics
Programmimg With JavaScript
Data Entry Validation
 


Suggested Reading



Back to top

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme