The function sayHello is broken, you need to fix it.
It should take in the users name and return the greeting, in the proper format. Punctuation does matter.
Examples: ‘Hello, John!’, ‘Hello, Sara!’, ‘Hello, Peter!’
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
helper.js
export const sayHello = (name) => {
return 'Hello + name!';
}
solution.js
/**
* The function sayHello is broken, you need to fix it.
*
* It should take in the users name and return the proper greeting, in example: 'Hello, John!'
* */
import { sayHello } from './helper.js';
console.log(sayHello('John')); // Hello, John!
console.log(sayHello('Sandy')); // Hello, Sandy!