JavaScript

var foo = "str1";
var bar = "str2";
console.print(foo + bar);

Python

foo = "str1"
bar = "str2"
print(foo.join(bar))

Java

String foo = "str1";
String bar = "str2";
System.out.println(foo+bar);

PHP

$foo = "str1";
$bar = "str2";
echo $foo.$bar;