random number generator javascript pattern number and alphabet code example Example: random alphabet javascript Math.random().toString(36).substr(2, 5);