SyntaxError: Unexpected String


Needing help. Here's my code:

var greeting = function ("Hello" + name) {
    var name = "Leslie"

What's wrong with it? It's saying it has an unexpected string, but I don't know what the "Unexpected string" is. The topic I'm on is: JavaScript, Introduction to Functions in JS, Meet the functions, Tying it all Together.
Please help! Thanks!


var greeting = function ("hello" + name)

It should be

var name = prompt("What is your name?");
var greeting = function(){
console.log("Hello " + name);