javascript get a random number with 6 digits

JavaScript
Math.floor(100000 + Math.random() * 900000);
Source

Also in JavaScript: