samedi 27 octobre 2018

Grab 2 randomElements that are not the same?

I am trying to grab 2 random values that are not the same in a string like this

    var players = ["Jack, John, Michael, Peter"]
    var playersArray = ["\(players.randomElement) and \(players.randomElement) has to battle")

How am i to do this, so it grabs 2 different values?




Aucun commentaire:

Enregistrer un commentaire