python的.join
str = "-";
seq = ("a", "b", "c"); # 字符串序列,可以放list
print str.join( seq );
js的.join
var arr = new Array(3)
arr[0] = "George"
arr[1] = "John"
arr[2] = "Thomas"
var abc = arr.join('-')
console.log(abc) # George-John-Thomas
2023-12-09 16:26:21
python的.join
str = "-";
seq = ("a", "b", "c"); # 字符串序列,可以放list
print str.join( seq );
js的.join
var arr = new Array(3)
arr[0] = "George"
arr[1] = "John"
arr[2] = "Thomas"
var abc = arr.join('-')
console.log(abc) # George-John-Thomas