<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>JavaScript on LockBlock-dev blog</title><link>https://lockblock-dev.github.io/tags/javascript/</link><description>Recent content in JavaScript on LockBlock-dev blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 15 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://lockblock-dev.github.io/tags/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>Breaking Math.Random to win</title><link>https://lockblock-dev.github.io/posts/breaking-math-random-to-win/</link><pubDate>Mon, 03 Mar 2025 00:00:00 +0000</pubDate><guid>https://lockblock-dev.github.io/posts/breaking-math-random-to-win/</guid><description>&lt;p&gt;I was talking with &lt;a href="https://github.com/MasterIO02"&gt;MasterIO&lt;/a&gt; about Yuna, the Discord bot of &lt;a href="https://ordr.issou.best/"&gt;o!rdr&lt;/a&gt;, when I said that I could win big money.&lt;/p&gt;
&lt;p&gt;Big money in this story means virtual currency from a Discord bot. Sadly I did not buy a house with JavaScript.&lt;/p&gt;
&lt;p&gt;He told me to &amp;ldquo;win against &lt;code&gt;Math.random&lt;/code&gt;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;So I did what any reasonable person would do. I googled how to break &lt;code&gt;Math.random&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="javascript-moment"&gt;JavaScript moment&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;Math.random()&lt;/code&gt; is not magic. It does not call the universe and ask it politely for a number. It is pseudo-random, which means that it uses an internal state to generate numbers that look random enough for most things.&lt;/p&gt;</description></item></channel></rss>