I need to generate a random number in JavaScript (it depends but max. 12 digits number). The key is to limit the repetition of a particular digit to only one repetition.