function getRandomNumber(max, cb) {
setTimeout(() => {
const number = Math.floor(Math.random() * max);
console.log(number);
 
cb(number - 2);
}, 1000);
}
 
getRandomNumber(100, console.log);
 
 
 
Code will run automatically after changes.
Code runs in an isolated environment.