GA Javascript exercise help

It was all good until I got to the Javascript script at the bottom. The Javascript does not run. Do you know why?

Your code isn’t doing anything, You have to use the alert function.

alert('some alert message')
1 Like

Thanks! I didn’t realise I had to include that word in the script.

The word alert is the name of the function. You call functions (run them) by their name.

function sayName(name) {
  console.log(name); // brian
}

sayName('brian')

It will make more sense in do time, just keep at it. Happy coding.

1 Like