-2
["C-1", "C-2", "C-3"], ["R-1","R-2", "R-3"], ["P-1","P-2", "P-3"] como faço para imprir em Crecent order and with priority one at each example click :
password with P comes in 1
password with R comes in 2
password with C comes in 3
someone has an idea to do?
const listaDeSenhaComum = [];
const listaDeSenhaRapida = [];
const listaDeSenhaPrioritaria = [];
let senhaComum = 1;
function gerarSenhaComum() {
let senhaComumGerada = `C-${senhaComum++}`;
listaDeSenhaComum.push(senhaComumGerada);
console.log(listaDeSenhaComum);
}
let senhaRapida = 1;
function gerarSenhaRapida() {
let senhaRapidaGerada = `R-${senhaRapida++}`;
listaDeSenhaRapida.push(senhaRapidaGerada);
console.log(listaDeSenhaRapida);
}
let senhaPrioritaria = 1;
function gerarSenhaPrioritaria() {
let senhaPrioritariaGerada = `P-${senhaPrioritaria++}`;
listaDeSenhaPrioritaria.push(senhaPrioritariaGerada);
console.log(listaDeSenhaPrioritaria);
}
ai in html every time someone clicks on call proxímo, print in priority order one every click.
R passwords should only be printed if there is no one in P, following the same for C and R?
– André Walker
that’s exactly what
– mumu
Sorting lists is the least of the problems. Questions are: How do you define the type of password each user will receive? How many boxes? How do you link the password to the boxes? How do you define whether a box is free or not? Where is the HTML code that will interact with the user?
– Augusto Vasques