I have a question, I need to make a function in JavaScript that shows the 50 numbers that the sum of their digits equals 10, eg:
Number 19, digits 1 and 9, sum of digits: 1 + 9 = 10. The function should show me the number 19, showing a total of 50 numbers.
At first I was able to calculate the digits of the number using a form , I just could not develop logic to show the 50 numbers.
function start() {
var form = document.getElementById("exercicio_8");
var x = form.num_5.value;
var y = x.toString().split("");
var soma = eval(y.join('+'));
document.getElementById("saida2").innerHTML = soma;
}