0
help or explain please!!
Write a simple function that takes no parameters called sayHello. When called this function should print âHello, ____!â to the console, where the blank is equal to the first index value in the splitName array from the previous question. Call the function. This is the previous question underneath!! splitName should equal[âFirst nameâ, âlast nameâ] when printed to the console
1 Answer
+ 3
let splitName = "John Doe".split(" ");
function sayHello() {
console.log("Hello, " + splitName[0]);
}
sayHello();