|
JavaScript concat() Method
Complete String Object Reference
Definition and Usage
The concat() method is used to join two or more strings.
Syntax
|
stringObject.concat(stringX,stringX,...,stringX)
|
| Parameter |
Description |
| stringX |
Required. One or more string objects to be joined to a string |
Example
In the following example we will create two strings and show them as one using concat():
<script type="text/javascript">
var str1="Hello ";
var str2="world!";
document.write(str1.concat(str2));
</script>
|
The output of the code above will be:
|
Complete String Object Reference
729,913 sites built with Wix. Make your own
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|