The accepted answer here gave me unpredictable results, sometimes weirdly adding months and years.
The most reliable way I could find was found here
Add days to Javascript Date object, and also increment month
var dayOffset = 20;
var millisecondOffset = dayOffset * 24 * 60 * 60 * 1000;
december.setTime(december.getTime() + millisecondOffset);
EDIT: Even though it has worked for some people, I don't think it is entirely correct. I would recommend going with a more popular answer or using something like http://momentjs.com/