var Arr =['zjjmc8090']; var n = Math.round(Math.random() * (Arr.length - 1)); if (typeof(Arr[n])=="undefined") { Arr[n]=""; }