List of utility methods to do Random ID Get
generateRandomId(length)function generateRandomId(length) { "use strict"; var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", returnValue = "", x, i; for (x = 0; x < length; x += 1) { i = Math.floor(Math.random() * 62); returnValue += chars.charAt(i); return "JS_" + returnValue; |