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