'Add 10 more days to new Date Javascript [duplicate]

So I'm getting the date to this format like this: 12.12.2023 with this function:

var today = new Date();
  var dd = String(today.getDate()).padStart(2, '0');
  var mm = String(today.getMonth() + 1).padStart(2, '0');
  var yyyy = today.getFullYear();
  today = dd + '.' + mm + '.' + yyyy;

And what I want to do is for example, add more 10 days to it. for example, if it is: 12.12.2023 to be 22.12.2023



Solution 1:[1]

let days = 10;
today.setDate(today.getDate() + days);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Diego De Vita