title: how to alphabetise an array in javascript using a loop?
body: <p>This is the JavaScript code to alphabetically sort the array, however i was searching for a way to bubble sort each item one at a time using a loop. please can you suggest a way of doing this or another alternative to sort()</p>
  
  <pre><code>var products = ["Printer", "Tablet", "Router", "Scanner", "Moniter", "Projector", "USB", "Keyboard"]
  document.getElementById("alphabetical.order").innerHTML = products;
  function alphabetical() {
      products.rsort();
      document.getElementById("alphabetical.order").innerHTML = products;
  } 
  </code></pre>