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 Resposta
+ 3
let splitName = "John Doe".split(" ");
function sayHello() {
console.log("Hello, " + splitName[0]);
}
sayHello();