Concat Method (String)

Source: Internet
Author: User

Returns a string value that contains the connection of two or more supplied strings.

string1.concat([string2[, string3[, . . . [, stringN]]]])

Parameters

String1

Required option. A string object or literal that is to be connected to all other specified strings.

string2,.. ., stringn

Options available. A String object or text to connect to the string1 tail.

Description

The results of the concat method are equal to: result = string1 + string2 + string3 + ... + stringn. The value in another string is unaffected regardless of whether the values in the source string or result string change. If there is a parameter that is not a string, it is converted to a string before being connected to string1 .

Example

The following example illustrates the use of the concat method when using strings:

function concatDemo(){var str1 = "ABCDEFGHIJKLM"   var str2 = "NOPQRSTUVWXYZ";str1.concat(str2);   returns a string that is well connected. return(s);}


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.