How to concatenate several strings in JavaScript?

JavaScript provides multiple methods to concatenate several strings. The most common approaches include using the + operator, template literals, Array.join(), and the concat() method.

Method 1: Using the + Operator

The simplest way to concatenate strings is using the + operator:


   
      
   

John, Amit, Sachin

Method 2: Using Template Literals (ES6)

Template literals provide a cleaner syntax using backticks and ${} placeholders:


   
      
   

John, Amit, Sachin

Method 3: Using Array.join()

When concatenating multiple strings with the same separator, Array.join() is very efficient:


   
      
   

John, Amit, Sachin

Method 4: Using concat() Method

The concat() method joins strings without modifying the original strings:


   
      
   

John, Amit, Sachin

Comparison

Method Best For Performance
+ operator Simple concatenation Good
Template literals Complex strings with variables Good
Array.join() Many strings with same separator Best for large arrays
concat() Method chaining Good

Conclusion

Choose the concatenation method based on your needs: use + for simple cases, template literals for complex formatting, and Array.join() for multiple strings with consistent separators.

Updated on: 2026-03-15T22:19:43+05:30

327 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements