Four is magic: Difference between revisions
→{{header|JavaScript}}
(Added Wren) |
|||
Line 770:
=={{header|JavaScript}}==
Utilizing the new [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt BigInt type] (added in ECMAScript 2019), and akin to the Python example, this implementation supports numbers as high as at least 10^3003, and could support even higher values by adding items to the dictionary.
To test whether a JavaScript interpreter implements `BigInt`, we can evaluate a boolean expression like:
<lang javascript>Object.getOwnPropertyNames(this).includes('BigInt')</lang>
<lang javascript>const reverseOrderedNumberToTextMap = (function () {
|