title: Button Clicked true or false - JavaScript
body: <p>I am a Bit Beginner In JavaScript. So I need a code about { If we clicked a button a function need to run} more of them suggested this but it still not working ! and I don`t know why? Can you solve it?</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-js lang-js prettyprint-override"><code>if(document.getElementById("btn").clicked == true){
  //some code here
      console.log("working");
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button id=""btn&gt;ClickEvent&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>