title: split up string with delimiter only using basic language(if,for,while etc)
body: <p>i have the function:</p>
  
  <pre><code>//this function takes two params, a string and then the delimiter where the string is to be split up
  function substringSplit(str, del){
      var str;
      var del;
      for(var i=0;i&lt;str.length;i++){
          if(!str[i]==del){
              var res = str[i];
              console.log(res);
          }
      }
  </code></pre>
  
  <p>and what i am trying to achieve is splitting up a string e.g "the house is there" with a delimiter i.e " ", however my code isnt doing this properly! </p>
  
  <p>does any one have any suggestions? </p>
  
  <p>ps the idea is to not use another functions i.e split(). </p>