Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Add Days to Specific Date in JavaScript</title> </head> <body> <script> // Specific date var date = new Date('August 21, 2021 16:45:30'); document.write(date + "<br>"); // Add ten days to specified date date.setDate(date.getDate() + 10); document.write(date); </script> </body> </html>