JSFiddle - React, Tailwind, and code Playground
JavaScript
function generateRandomInt(max) {
return Math.floor(Math.random() * Math.floor(max));
}
const store = new Set()
let randomInt1 = generateRandomInt(10) + 1;
let randomInt2 = generateRandomInt(10) + 1;
let numberStore = randomInt1 + "," + randomInt2;
store.add(numberStore)
store.add(numberStore) // duplicate won't be added
// open developer console to see the results
console.log(randomInt1);
console.log(randomInt2);
console.log(store);
console.log('--------------')