Here is the challenge I need help with:
Create a variable called
myFriendusing one of the variable declarations described above (var,let, orconst). Set the variable you created to contain your friend's name. Inside the greetings function, return the string: "Greetings [your-friend's-name].
New to this, but I can't seem to find out where the error is. Probably easy for you guys but, I'll get there.enter image description here
var myFriend = "Sara"
function greetings() {
let greetings = "greetings, " + myFriend
}
console.log('results: ,'+greetings());
You forgot the return statement.
return greetings;