I have this code in a backend/testModule.jsw file
let randomVariableA = Math.floor(Math.random() * (500 - 1 + 1) + 1);
let randomVariableB = Math.floor(Math.random() * (1000 - 1 + 1) + 1);
let randomVariableC = Math.floor(Math.random() * (1500 - 1 + 1) + 1);
export function getAllRandoms() {
return 'Randoms are,'+randomVariableA+','+randomVariableB+','+randomVariableC;
}
When i call this using from a client side page on my website using
getAllRandoms().then((result) => {
console.log(result);
});
I get the exact same values across browsers and devices. I tried finding some information about this behaviour but couldn’t… Can somone explain this? And is there any other such special rules for modules I can find on some articles?