title: I have tried to run this file in html but give me that error uncaught-reference script-is-not-defined
body: <pre><code>var alreadyDid = [];
  const getId = setInterval(() =&gt; {
  var weapon = priceArray[~~(Math.random() * priceArray.length)];
  fetch(`http://localhost:3000/api/${weapon.name}`, {
          &quot;headers&quot;: {
              &quot;accept&quot;: &quot;application/json, text/plain, */*&quot;,
              &quot;accept-language&quot;: &quot;en-US,en;q=0.9&quot;,
              &quot;sec-ch-ua&quot;: &quot;\&quot;Chromium\&quot;&quot;,
              &quot;sec-ch-ua-mobile&quot;: &quot;?0&quot;
          },
          &quot;referrerPolicy&quot;: &quot;no-referrer-when-downgrade&quot;,
          &quot;body&quot;: null,
          &quot;method&quot;: &quot;GET&quot;,
          &quot;mode&quot;: &quot;cors&quot;
      })
      .then(function(response) {
          return response.json();
      })
      .then(function(json) {
          for (value in json) {
              const item = json[value];
              if (item.price &lt; weapon.price) {
                  var sanitized_price = item.price.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
                  console.log(weapon.sanitized_name, sanitized_price)
                  fetch(&quot;https://gtalife/gameMenuAuctionEvent&quot;, {
                      &quot;headers&quot;: {
                          &quot;accept&quot;: &quot;application/json, text/plain, */*&quot;,
                          &quot;content-type&quot;: &quot;application/json;charset=UTF-8&quot;,
                          &quot;sec-ch-ua&quot;: &quot;\&quot;Chromium\&quot;&quot;,
                          &quot;sec-ch-ua-mobile&quot;: &quot;?0&quot;
                      },
                      &quot;referrer&quot;: &quot;&quot;,
                      &quot;referrerPolicy&quot;: &quot;no-referrer-when-downgrade&quot;,
                      &quot;body&quot;: `{\&quot;type\&quot;:\&quot;takeOffer\&quot;,\&quot;data\&quot;:{\&quot;id\&quot;:${item.id},\&quot;sell\&quot;:true}}`,
                      &quot;method&quot;: &quot;POST&quot;,
                      &quot;mode&quot;: &quot;cors&quot;
                  });
                  
              }
          }
      });
  }, 200);
  console.log(&quot;interval id = &quot;, getId);
  </code></pre>