//The join() method also joins all array elements into a string.
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.join(" * ");
// result : Banana * Orange * Apple * Mango
//if you find this answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
a="grayorphanvillain"
for k in "|/":
t=k.join(a)
print(t)
#output:
g
ayo
pha
villai
g|r|a|y|o|r|p|h|a|n|v|i|l|l|a|i|n
g/r/a/y/o/r/p/h/a/n/v/i/l/l/a/i/n
w=["as","3e","1"]
a='vf'.join(w)
// w neccessarily needs to be a list of strings.
print(a)
//displays string asvf3evf1