title: Multiple underscores randomly in a string
body: <p>I want random multiple underscores every time I refresh the page in a string...</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
     &lt;p id="demo"&gt;&lt;/p&gt;
     &lt;p id="temo"&gt;&lt;/p&gt;
     &lt;p id="jemo"&gt;&lt;/p&gt;
     &lt;p id="remo"&gt;&lt;/p&gt;
     &lt;script&gt;
       var i;
       var x="Sachin Tendulkar";//String in which i want underscores
       var res=x.split("");
       for(i=1;i&lt;=7;i++)//here in this for loop i generated random numbers and accessing the elements at that indexes and try to put underscores there.
       {
         var j = document.getElementById("demo").innerHTML=Math.floor(Math.random()*         ((x.length-1)/2));
         var t = res[j];
         var f = document.getElementById("jemo").innerHTML=x.replace(res[j],"_");
         var l = document.getElementById("jemo").innerHTML=f.replace(res[j],"_");
  
       }
     &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>