O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Combining Strings

var str1="jQuery"; var str2=" & "; var str3="JavaScript"; var str4 = str1.concat(str2, str3); //str5 = "jQuery & JavaScript" var str5 = str4 + " Phrasebook";    //str5 = "jQuery & JavaScript Phrasebook"

You can combine multiple strings using the .concat(str, str, ...) method. Or you can just use the str + str + str . . . method.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required