Convert number to "boolean bit array" in JavaScript
<p>I have a number 5. How to get a &quot;boolean bit array&quot; like the array below?</p>
<p><code>array = [false, false, true, false, true]; // 00101</code></p>
<p>(Need reserve the first two false)</p>