Javascript - String.concat()

 

Syntax

string.concat(string2)

Description

The concat() method of an instance of the String object concatenates the string in string2 to the end of string to return a new string.

Example

<script language="JavaScript">
<!--

var myString1 = new String("Hello, ");
var myString2 = new String("World!");
var myConcatString = myString1.concat(myString2);

alert(myConcatString); //result is 'Hello, World!'

//-->
</script>
              

 

 
Visitor Review  Write a review
No visitor review for this page yet
Write a review
Rating:
Text:
Name:
Email:
(optional)
 
Code:
 

Search this site