Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How this code works?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #144848
    Kuzyo
    Participant

    Hi guys. <br>Have problem, how to take element from array in a random way without repeating itself. The problem was solved, but I can properly understand how it works. Here is codepen http://codepen.io/Kuzyo/pen/vdlai. <br>
    Don’t understand this part:

      temp = characters[i];
       characters[i] = characters[j]; 
       characters[j] = temp;
    

    Can somebody explain? Thanks.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.