function createRetreivalCode(length = 8) {
    var result = "";
    var characters = "abcdefghijklmnopqrstuvwxyz0123456789";
    for (var i = 0; i < length; i++) {
      result += characters.charAt(
        Math.floor(Math.random() * characters.length)
      );
    }
    return result;
  }
// Got from Stackoverflow, don't trust!
Got from Stackoverflow, don't trust!
Got from Stackoverflow don ' t trust!
function createRetreivalCode(length = 8) {
    var result = "";
    var characters = "abcdefghijklmnopqrstuvwxyz0123456789";
    for (var i = 0; i < length; i++) {
      result += characters.charAt(
        Math.floor(Math.random() * characters.length)
      );
    }
    return result;
  }
function createRetreivalCode ( length = 8 ) { var result = "" ; var characters = "abcdefghijklmnopqrstuvwxyz0123456789" ; for ( var i = 0 ; i < length ; i ++ ) { result += characters . charAt ( Math . floor ( Math . random ( ) * characters . length ) ) ; } return result ; }
Got from Stackoverflow, don't trust!
Got from Stackoverflow don ' t trust!