Hi @John_Okoye,
It’s not entirely clear what the problem is from the screenshot you’ve provided, but for a start your code between the script tags should be alert("myMessage");
and not article
. You also need to save your file before you run it (the blue dot in the tab means that you haven’t saved your latest version yet.
Are you getting any error messages in the console when you try to run this code? If so, let us know what they are.
Also, your code within the script tags should automatically be interpreted as JavaScript, without needing to include the attribute type="text/javascript"
. But it should still run whether you include it or not, so that won’t be the problem.
In order for us to be able to run any code you are having problems with, and would like us to test for you, you need to include your actual code appropriately formatted, not just a screen shot. Before you add your code to post it here in the forum, click on the </> icon in the menu at the top of the text editor. That will give you 2 sets of 3 back ticks…
```
```
If you now input your code between these, you will end up with it nicely formatted. You will probably still need to organise it a bit more with the correct spacing and indentation etc., but it’s much easier to do that effectively once it’s formatted than when it’s not. It will also help you spot any errors that may have crept in before posting it, as the code is much clearer and easier to read.
Let us know if this hasn’t solved your problem, and if you still can’t get the function alert()
to execute.