That's 15 commas, not 16.
function pad(n, c) { return Array(n+1).join(c); } // pad(6, "-") === "------"