title: How to a data from the element that i clicked using "This" in JS?
body: <p>I want to get a data from the element that i clicked using <code>this</code> in JavaScript?</p>
  <p>but insisted of the data it's return <code>undefined</code>.</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>function jj(){
      let yty = this.num;
      console.log(yty);
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>li {
  width:200px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button num="2" onclick="jj()"&gt;3&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>