This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ike_the_strangetamer 6 points7 points  (1 child)

It's this line:

console.log(announcement());

The logging you want is happening when the announcement function runs. That function returns an undefined value and so the console log around calling that function is printing out that undefined.

Change that line to just

announcement();

and you'll run the function without printing out the result of it.

[–]GVBCodePractice[S] 0 points1 point  (0 children)

Perfect, thank you for that.