Define a say() function which accept a name as an argument. The say() function will return "Hi [name]!" if name is provided. Otherwise, it should return "Hi there!"
Example code:
function say(name) {
// Enter your answer here
}
Execution examples:
Input: name="Peter"
Output: "Hi Peter!"
Explanation: Given the input name is "Peter", therefore it should return "Hi Peter!"
Input: name=""
Output: "Hi there !"
Explanation: Given the input name is an empty string, therefore it should return "Hi there!"