Functions with javascript

i just bought the javascript absolute begginers guide and whenever i put in alert(“hello!”) it turns pink and just ends up with a blank screen and no popup

thanks for helping

Hi Ed! Welcome to the forums :slight_smile:

Can you please share the full code you have in your document?


i just got the book a few days ago this is all i have

<!DOCTYPE html>

    <meta charset="utf-8">



        function sayHello() {

You need to call the sayHello function to have it run, as shown below. That should do it :slight_smile:

    function sayHello() {

Thanks A lot you were a great help now I can continue the book!

Thanks again!

1 Like

Glad it worked out :slight_smile:

Feel free to create new topics for any other questions or issues you have, no matter how big or small!