help or explain please!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

2nd Apr 2018, 3:16 AM
Coder1995
Coder1995 - avatar
1 Answer
+ 3
let splitName = "John Doe".split(" "); function sayHello() { console.log("Hello, " + splitName[0]); } sayHello();
2nd Apr 2018, 3:37 AM
ChaoticDawg
ChaoticDawg - avatar