Generate random data in JavaScript