Given two strings, append them together (known as “concatenation”) and return the result.





Test cases:

Test cases Expected Result
stringConcat(Hello,World) Hello World OK
stringConcat(Code,ranch) Code ranch OK
stringConcat(Web,Application) Web Application OK

Java solution:

public class Program5 {
	public static void main(String[] args) {
		Program5.stringConcat("Hello","World");
		Program5.stringConcat("Code","ranch");
		Program5.stringConcat("Web","Application");
	}
	public static String stringConcat(String a,String b){
		return a+" "+b;
	}
}

Javascript solution:

const stringConcat = (a, b) => {
    return a +' '+ b;
}

console.log(stringConcat("Hello", "World")); //Hello World
console.log(stringConcat("Code","ranch")); //Code ranch
console.log(stringConcat("Web","Application")); //Web Application

 

Partners: paypal casino talletus come vincere sempre al crazy time vlt gratis book of ra casinos astropay zimpler konto demo sweet bonanza online casino auszahlung ohne verifizierung udenlandske online casino crazy time live streaming book of ra gioco gratis

Bushan Sirgur

Hey guys, I am Bushan Sirgur from Banglore, India. Currently, I am working as an Associate project in an IT company.

Leave a Reply