11. Functions Recap - HELP!


Can someone please help! I don't understand what I'm doing wrong! My code just comes back saying there's a problem with my syntax.

var nameString = function (name) {
return "Hi, I am" + " " + name;

Replace this line with your code.


I think you understand how to do functions, right(?), and it looks like it's just formatting issues.

  • You don't need a semicolon after the variable name
  • You have an extra curly bracket, the one at the end isn't needed. It's not closing anything up.

I'm pretty sure that's it. Also, next time, try adding three backticks (`) before and after your code so it's easier to read and keep the formatting. :slight_smile:


Thanks! It's always a silly small error that I end up making!

Appreciate your help! :slight_smile: