“String-Verkettung” Code-Antworten

String -Verkettung in JS

var str1 = "Hello ";
var str2 = "world!";
var res = str1.concat(str2);
console.log(res);
JavascriptNinja

Python verschmelzen Saiten

my_list = ['a', 'b', 'c', 'd']
my_string = ','.join(my_list)
# Output = 'a,b,c,d'
Quercia

Verkettung von Streichern

# 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
codeconnoisseur

String-Verkettung

first = "first words"
second = "second words" 
third = first+second
print(third)
Javasper

String-Verkettung

String firstName = "John ";
String lastName = "Doe";
System.out.println(firstName.concat(lastName));
Magnificent Monkey Adi

Ähnliche Antworten wie “String-Verkettung”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen