0
let user = require(`readline-sync`)
let loteria = {
totalNumeros: "",
intervalo: "",
numeros1: "",
numeros: [],
numeroexcluido: "",
sortear: function () {
this.totalNumeros = user.questionInt("Informe quantos numeros deseja sortear: ")
this.intervalo = user.questionInt("Informe qual o numero maximo: ")
for (let i = 0; i < this.totalNumeros; i++) {
this.numeros[i] = Math.floor(Math.random() * this.totalNumeros + 1)
}
console.log(this.numeros);
}
}
draw lottery.()
This is the code so far, I just wanted to perfect it but I’m cracking my head and I can’t.