Modify the function to return the given string with an exclamation mark
kyleekeith (0)

I'm having issues with a code challenge and I'm a little stumped. If someone would be kind enough to help me understand what Im doing wrong I feel like this is simple but Im just not grasping it.
Modify the function to return the given string with an exclamation mark added to the end of it.

function addExclamation(s) {

/ Do not modify code below this line /

console.log(addExclamation('hello world'), '<-- should be "hello world!"');

You are viewing a single comment. View All
ash15khng (234)

Just do return s + "!";
return returns the string, and s+"!" concatenates the string s with "!". (concatenate means put together)