Why Load jQuery in vs ?

Hi, I'm running into problems where my jQuery is not executing because the dependency has not yet loaded. I know I can add code to the header directly, but how can I prevent Bootstrap Studio from loading it twice?

Wrap your code in a script that checks for jquery. Once jquery is loaded it will run the script.

(function() {
  var nTimer = setInterval(function() {
    if (window.jQuery) {
      // Do something with jQuery
      clearInterval(nTimer);
    }
  }, 100);
})();