What happens is that I have a code and I want to implement it within a for or something in JavaScript so that for example I have the date 09/15/2018, I add it to 15 days to be something like 09/30/2018, 10/15/2018, 10/30/2018 and so on ...
FechaPrimerPagoInput = $('#input-date').val();
fechaPrimerPago = new Date(FechaPrimerPagoInput);
periocidad = 1000 * 60 * 60 * 24 * 15;
suma = fechaPrimerPago.getTime() + periocidad;
pagoFecha = new Date(suma);
Please help, it's something simple but not used with the Date, in the variable periodicity is at the end on the 15th, which would be every count, but can change from 15 to 30.