title: execute a method in case clicking a button
body: <p>i'm having lot of troubles with JS, please help me a lit</p>
  
  <p>i have a button at HTML</p>
  
  <pre><code>&lt;button class="btn btn-outline-dark" onclick=""&gt;View/button&gt;
  </code></pre>
  
  <p>at another JS file i have a method</p>
  
  <pre><code>updateBot = async (bot) =&gt; {
      const response = await ownFetch.put('/rest/api/bot/update', {
          headers: {
              'Content-Type': 'application/json;charset=utf-8'
          },
          body: JSON.stringify(bot)
      });
      return await response.json()
          .catch(err =&gt; console.log(err.status));
  };
  </code></pre>
  
  <p>how to execute a method in case clicking a button??</p>
  
  <p>maybe it's simple question, but my mind is blow</p>
  
  <p>thank you for your answers!</p>