sample/common/utils/utils-service.js
function newRandomKey(coll, key, currentKey){
      var randKey;
      do {
        randKey = coll[Math.floor(coll.length * Math.random())][key];
      } while (randKey == currentKey);
      return randKey;
    }
function newRandomKey(coll, key, currentKey){
      var randKey;
      do {
        randKey = coll[Math.floor(coll.length * Math.random())][key];
      } while (randKey == currentKey);
      return randKey;
    }
function newRandomKey ( coll , key , currentKey ) { var randKey ; do { randKey = coll [ Math . floor ( coll . length * Math . random ( ) ) ] [ key ] ; } while ( randKey == currentKey ) ; return randKey ; }
Util for returning a random key from a collection that also isn't the current key
Util for returning a random key from a collection that also isn t the current key