title: How to randomly generate numbers without repetition in javascript?
body: <p>I want to generate each number between 0 to 4 randomly using javascript and each number can appear only once. So I wrote the code:</p>
  
  <pre><code>for(var l=0; l&lt;5; l++) {
      var randomNumber = Math.floor(Math.random()*5);  
      alert(randomNumber)
  }
  </code></pre>
  
  <p>but this code is repeating the values. Please help.</p>