I have to create a function in JavaScript
that takes all the id's from a table and makes a draw with id's of the same table so that a same id does not fall with itself, and that there is a possibility that this id can being in the other "home".
exps:
1|2 - 2|1... válido.
1|1 - 2|2... inválido.
In this way:
var teste = [];
for (var i = 1; i <= 305; i++) {
for (var x = 1; x <= 305; x++) {
if(x != i){
teste.push(i+'|'+x);
}
}
}
console.log(teste)
I would like to know if there is any way to know how long this function takes to run, since it generates more than 90,000 records.