“Gabungan string” Kode Jawaban

gabungan string di JS

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

Python menggabungkan string

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

string contatenating

# 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

Gabungan string

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

Gabungan string

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

Jawaban yang mirip dengan “Gabungan string”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya