title: Why javascript "write() function" isn't working when referring to an element by jquery?
body: <p>Hey guys,
  My array is printing it's values on page when:</p>
  
  <pre><code>document.write(unsorted[i]+"&lt;br/&gt;");
  </code></pre>
  
  <p>but not when trying to put it in a div referring the element by jquery</p>
  
  <pre><code>$("#no1").write(unsorted[i]+"&lt;br/&gt;");
  </code></pre>
  
  <p>Here's my code: </p>
  
  <pre><code>$(function(){ 
      var unsorted = new Array();
      function randomNumber(x,y) { //gives a random number
        return Math.floor((Math.abs(y - x) + 1) * Math.random()) + Math.min(x, y);
      }
  
      for(i=0; i&lt;=33; i++){
          unsorted[i]=randomNumber(0,33);     //populates the array with random numbers
          $("#no1").write(unsorted[i]+"&lt;br/&gt;");   //#no1 is a div
      }
  });
  </code></pre>
  
  <p>Jquery library is tested and works fine whatever is it's my code!
  Any suggestions why my approach is wrong appreciate any help
  10x</p>