title: How to create 10 digit unique value using meteor or javascript
body: <p>I need to generate 10 characters(both letters and digits) unique codes to apply for system generated gift vouchers. currently, I'm using following code.But it contains 13 numbers.</p>
  
  <pre><code>var today = new Date();
  Number(today);
  </code></pre>
  
  <p>Is there is any other way to create 10 digit unique values to apply system generated gift vouchers.It should never same at any time.Code should be generated like in _id in meteor collection.What is the best possible way to do this?</p>
  
  <p>In meteor it generates an unique id for records.Like that I need to create a 10 digit unique value</p>