The two answers you got didn’t really answer your question. I’m still with you as far as confusion about not making * (100 - 1 + 1) just 100.
Comment on Tesseract Dev (AdmiralPatrick) RageQuits Lemmy with Final Goodbye Message
ArmoredThirteen@lemmy.zip 2 days agoI’ve never done much in JavaScript but isn’t (100 - 1 + 1) just 100? Am I missing some JS magic?
sin_free_for_00_days@sopuli.xyz 2 days ago
SailorFuzz@lemmy.world 2 days ago
ohshi, yea, you’re right. I totally spaced that… why didn’t he just write 100 there? I get the last
+1to keep it non-zero…I think bro just script-kiddied a random number script.
sin_free_for_00_days@sopuli.xyz 2 days ago
I honestly was thinking it was some language quirk that I just didn’t understand.
fuzzywombat@lemmy.world 2 days ago
I’m leaning towards AI slop coding.
petrol_sniff_king@lemmy.blahaj.zone 2 days ago
People aren’t actually answering your question, so I will:
I have no fucking idea what
-1 + 1is supposed to be doing.If it were
“100” - 1 + 1, I might say he’s converting a string to a number, but he isn’t, so… ¯\_(ツ)_/¯einlander@lemmy.world 2 days ago
It takes the random number given by the generator (float value between 0 and 1), and maps it to a number between 1 and 100
SailorFuzz@lemmy.world 2 days ago
that section of the script is just generating a random number (two actually) that it’ll use to try and pull up a page.
Better read, is this a a loop of 500. In that loop there are 4 page accesses being attempted.
so it uses your computer 500 times to access their page 4 different ways.
If anything, I undershot the estimate (their random number is sloppy, and will have collisions). But assuming they don’t have any collisions, they use your computer to ping dbzero0 2000 times