简体   繁体   中英

How can i concatenate 2 strings in node.js?

var link = 'https://thisIsAlink'
var line = 'this is a line'

what i have done is

var full_path = session.send(link + line)

The output i got: https://thisIsAlink this is a line
The output i want: https://thisIsAlinkthis is a line

Var1 = 'this sentence'
Var2 = 'new sentence'
Var2 += Var1

This output is: new sentencethis sentence
If you want just switch the contat and you get the opposite

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM