JavaScript Concat

concat() joins one or more strings onto the end of the string it is called on and returns the combined result. In modern JavaScript the + operator or template literals do the same job more readably, but concat makes chaining explicit.

Syntax

str.concat(str1, str2, ...)

Examples

Input Arguments Output
"foo" "bar" "foobar"
"a" "b", "c" "abc"
↳ concat accepts multiple arguments.

When to use it

  • Build a string from several parts in a pipeline.

Gotchas

  • For readability, prefer `${a}${b}` template literals or a + b in everyday code.

Try it live

Type your input and see Concat transform it instantly.

Description: Concatenates multiple strings.

Example: 'iced'.concat(' ', 'coffee') => 'iced coffee'

Want to go further? Chain Concat with other functions in the visual Playground — pipe one output into the next and watch your data transform.

Related functions

© 2026 Heifara Buval