next up previous contents
Next: fromCharCode Up: Methods Previous: charCodeAt   Contents


concat

Description
Combines the value of the String object with the parameters and returns the newly formed string; the original value of the String object is unchanged.


Syntax

  1. StringObj.concat(value_1, ..., value_n)
  2. "String Literal".concat(value_1, ..., value_n)


Parameters

value_1, ..., value_n
Zero or more values to be concatenated.


returns

The result of the concat method is equivalent to:
result = StringObj + value_1 + ... + value_n


Example

s0 = "This is an ";
s1 = "example for ";
s2 = "String.concat";
r = s0.concat(s1, s2);
//r = "This is an example for String.concat";




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.