4 pts
Create a function that takes a string (word) and adds "!" to the end of the string (word) before returning it. Example: addExclamation("hey") should return "hey!". You can assume the given string (word) will contain at least one character.
function addExclamation(word){
//Enter your code below
return word
}
function addExclamation(word){
//Enter your code below
return word
}
Test Cases:
-
addExclamation("hello") to return hello!
-
addExclamation("good bye") to return good bye!
-
addExclamation("Thanks!") to return Thanks!!