Combining multiple strings in Javascript

I have 3 strings in my js code listed as below:

var code : String = "";
var code1 : String = "";
var code2 : String = "";

I later change what they say depending on what happens and i want to know how i can combine them all into 1 string with some other text. I want to put “-” between them.

Another example could be a talking situation where i want it to say "Hello, ‘string’. nice to see you again. Are you feeling ‘string1’

Also i need to print these out and not just put it in a console log if that helps

I actually just found my answer by messing around a bit. This is the code i cam up with:

var codet = code1 + "-" + code;

and i put it inside my function instead of at the top of the script.

Hope this helped anyone else looking!