JavaScript HelloWorld
<pre><code>&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;script type="text/javascript"&gt;
            function myFunction()
            {
                alert(“Hello World!”)
            }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;p&gt;
            &lt;button onclick="myFunction()"&gt;Create a Dialog Box!&lt;/button&gt;
        &lt;/p&gt;
        &lt;p&gt;
            &lt;button onclick="myFunction()"&gt;Create Another Dialog Box!&lt;/button&gt;
        &lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Can somebody tell me why the JavaScript code alone is not working? The two buttons are created but nothing happens when I click on it.</p>

<p>I just started learning JavaScript and so not able to find the error.</p>