Строка конкатенация в JS
var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
console.log(res);
JavascriptNinja
var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
console.log(res);
my_list = ['a', 'b', 'c', 'd']
my_string = ','.join(my_list)
# Output = 'a,b,c,d'
# concatenating strings just means combining strings together
# it is used to add one string to the end of another
# below are two exmaples of how concatenation can be used
# to output 'Hello World':
# example 1:
hello_world = "Hello" + " World"
print(hello_world)
>>> Hello World
# example 2:
hello = "Hello"
print(hello + " World")
>>> Hello World
first = "first words"
second = "second words"
third = first+second
print(third)
String firstName = "John ";
String lastName = "Doe";
System.out.println(firstName.concat(lastName));