JavaScript - Example mm/dd/yyyy formatted dates | USA

// use a function for the exact format desired...
function MDYDateString(d){
  function pad(n){
    return n< 10? '0'+ n: n;
  }
  return pad(d.getUTCMonth()+ 1)+ '/'+ pad(d.getUTCDate())+ '/'+ d.getUTCFullYear();
}
// prints something like 12/20/2012
var d= new Date();
console.log(MDYDateString(d));