title: Concatenating numbers as string in Javascript
body: <pre><code>myCoolObject {
    a: 0
    b: 12
    c: 24
  }
  </code></pre>
  
  <p>I want to concatenate <code>a</code>, <code>b</code> and <code>c</code> so that they look like a unique string "a-b-c" (or "0-12-24" in the example).</p>
  
  <p><code>a</code>, <code>b</code> and <code>c</code> will always represent numbers. Converting each one of them from int to string require a lot of code: I'd just use <code>sprintf()</code> if I were in PHP or C, but how can I do this in JS without using <code>toString()</code> for each parameter and writing too much code?</p>
  
  <p>Whole code:</p>
  
  <pre><code>var pickedDate = this.getSelectedDay().year.toString() + "-" + this.getSelectedDay().month.toString() + this.getSelectedDay().day.toString();
  </code></pre>
  
  <p>Seriously? Isn't there any more efficient way of doing this in js?</p>