Problem
Given two strings word1 and word2, write a function solution that returns the result of concatenating the two strings.
Constraints
word1andword2consist only of lowercase English letters.- The lengths of
word1andword2are between 1 and 100 inclusive.
Test Case
| Test Case Number | word1 | word2 | return |
|---|---|---|---|
| 1 | "hello" | "world" | "helloworld" |
| 2 | "abc" | "def" | "abcdef" |
| 3 | "java" | "script" | "javascript" |
Explanation for Test Case 1
- When
word1 = "hello"andword2 = "world", the result of concatenating the two strings is"helloworld".
Explanation for Test Case 2
- When
word1 = "abc"andword2 = "def", the result of concatenating the two strings is"abcdef".
Explanation for Test Case 3
- When
word1 = "java"andword2 = "script", the result of concatenating the two strings is"javascript".