var lfRandom = 0; var i = 0; while (i < 1000) { lfRunTypeId = 4 + (lfRandom % 2); i++; }