title: Javascript Confirm Method is not working, Why there is no action on calling the method?
body: <p>I have got stuck to this small thing.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;head&gt;
    &lt;script&gt;
     function cnfm(){
     var r = window.confirm("hey");
    }
    &lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
    &lt;button onclick="cnfm"&gt;here&lt;/button&gt;
   &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Whenever I am pressing on the button, no action.</p>