How to join two strings in JavaScript

How to join two strings in JavaScript

4 Ways to join two strings in JavaScript

In this article, we will explain to you how to join two strings in JavaScript. here we will give you four simple examples of how to join two strings in JavaScript.

Way 1: Plus operator

We can easily combine two strings using the plus operator. so you can see the below example,

Way 2: Es6 Template literals

We can easily join two strings using Es6 Template literals. so you can see the below example.

Way 3: += operator

We can easily combine the first string with the second string into the third variable using += operator. so you can see the below example.

Way 4: concat() method

We can easily combine two strings using the javascript string concat() method. which is take one string argument parameter and it returns the concat string. so you can see the below example.

Please follow and like us: