{"id":68387,"date":"2019-07-23T04:19:12","date_gmt":"2019-07-23T11:19:12","guid":{"rendered":"http:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/"},"modified":"2019-07-23T04:19:12","modified_gmt":"2019-07-23T11:19:12","slug":"the-essential-guide-to-javascripts-newest-data-type-bigint","status":"publish","type":"post","link":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/","title":{"rendered":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt"},"content":{"rendered":"<link rel=\"canonical\" href=\"https:\/\/www.smashingmagazine.com\/2019\/07\/essential-guide-javascript-newest-data-type-bigint\/\"><title>The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt<\/title><\/p>\n<article>\n<header>\n<h1>The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt<\/h1>\n<address>Faraz Kelhini<\/address>\n<p>                  <time datetime=\"2019-07-22T14:00:59+02:00\">2019-07-22T14:00:59+02:00<\/time><time datetime=\"2019-07-23T11:06:23+00:00\">2019-07-23T11:06:23+00:00<\/time><\/header>\n<p>The <code>BigInt<\/code> data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the <code>Number<\/code> data type. The ability to represent integers with arbitrary precision is particularly important when performing mathematical operations on large integers. With <code>BigInt<\/code>, integer overflow will no longer be an issue.<\/p>\n<p>Additionally, you can safely work with high-resolution timestamps, large integer IDs, and more without having to use a workaround. <code>BigInt<\/code> is currently a stage 3 proposal. Once added to the specification, it will become the second numeric data type in JavaScript, which will bring the total number of supported data types to eight:<\/p>\n<ul>\n<li>Boolean<\/li>\n<li>Null<\/li>\n<li>Undefined<\/li>\n<li>Number<\/li>\n<li>BigInt<\/li>\n<li>String<\/li>\n<li>Symbol<\/li>\n<li>Object<\/li>\n<\/ul>\n<p>In this article, we will take a good look at <code>BigInt<\/code> and see how it can help overcome the limitations of the <code>Number<\/code> type in JavaScript.<\/p>\n<h3>The Problem<\/h3>\n<p>The lack of an explicit integer type in JavaScript is often baffling to programmers coming from other languages. Many programming languages support multiple numeric types such as float, double, integer, and bignum, but that\u2019s not the case with JavaScript. In JavaScript, all numbers are represented in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Double_precision_floating-point_format\">double-precision 64-bit floating-point format<\/a> as defined by the <a href=\"https:\/\/en.wikipedia.org\/wiki\/IEEE_754-2008_revision\">IEEE 754-2008<\/a> standard.<\/p>\n<div data-component=\"FeaturePanel\" data-audience=\"non-subscriber\" data-remove=\"true\"><\/div>\n<p>Under this standard, very large integers that cannot be exactly represented are automatically rounded. To be precise, the <code>Number<\/code> type in JavaScript can only safely represent integers between -9007199254740991 (-(2<sup>53<\/sup>-1)) and 9007199254740991 (2<sup>53<\/sup>-1). Any integer value that falls out of this range may lose precision.<\/p>\n<p>This can be easily examined by executing the following code:<\/p>\n<pre><code>console.log(9999999999999999);    \/\/ ? 10000000000000000\n<\/code><\/pre>\n<p>This integer is larger than the largest number JavaScript can reliably represent with the <code>Number<\/code> primitive. Therefore, it\u2019s rounded. Unexpected rounding can compromise a program\u2019s reliability and security. Here\u2019s another example:<\/p>\n<pre><code>\/\/ notice the last digits\n9007199254740992 === 9007199254740993;    \/\/ ? true\n<\/code><\/pre>\n<p>JavaScript provides the <code>Number.MAX_SAFE_INTEGER<\/code> constant that allows you to quickly obtain the maximum safe integer in JavaScript. Similarly, you can obtain the minimum safe integer by using the <code>Number.MIN_SAFE_INTEGER<\/code> constant:<\/p>\n<pre><code>const minInt = Number.MIN_SAFE_INTEGER;\n\nconsole.log(minInt);         \/\/ ? -9007199254740991\n\nconsole.log(minInt - 5);     \/\/ ? -9007199254740996\n\n\/\/ notice how this outputs the same value as above\nconsole.log(minInt - 4);     \/\/ ? -9007199254740996\n<\/code><\/pre>\n<h3>The Solution<\/h3>\n<p>As a workaround to these limitations, some JavaScript developers represent large integers using the <code>String<\/code> type. The <a href=\"https:\/\/developer.twitter.com\/en\/docs\/basics\/twitter-ids\">Twitter API<\/a>, for example, adds a string version of IDs to objects when responding with JSON. Additionally, a number of libraries such as <a href=\"https:\/\/github.com\/MikeMcl\/bignumber.js\/\">bignumber.js<\/a> have been developed to make working with large integers easier.<\/p>\n<p>With <code>BigInt<\/code>, applications no longer need a workaround or library to safely represent integers beyond <code>Number.MAX_SAFE_INTEGER<\/code> and <code>Number.Min_SAFE_INTEGER<\/code>. Arithmetic operations on large integers can now be performed in standard JavaScript without risking loss of precision. The added benefit of using a native data type over a third-party library is better run-time performance.<\/p>\n<p>To create a <code>BigInt<\/code>, simply append <code>n<\/code> to the end of an integer. Compare:<\/p>\n<pre><code>console.log(9007199254740995n);    \/\/ ? 9007199254740995n\nconsole.log(9007199254740995);     \/\/ ? 9007199254740996\n<\/code><\/pre>\n<p>Alternatively, you can call the <code>BigInt()<\/code> constructor:<\/p>\n<pre><code>BigInt(\"9007199254740995\");    \/\/ ? 9007199254740995n\n<\/code><\/pre>\n<p><code>BigInt<\/code> literals can also be written in binary, octal or hexadecimal notation:<\/p>\n<div>\n<pre><code>\n\/\/ binary\nconsole.log(0b100000000000000000000000000000000000000000000000000011n);\n\/\/ ? 9007199254740995n\n\n\/\/ hex\nconsole.log(0x20000000000003n);\n\/\/ ? 9007199254740995n\n\n\/\/ octal\nconsole.log(0o400000000000000003n);\n\/\/ ? 9007199254740995n\n\n\/\/ note that legacy octal syntax is not supported\nconsole.log(0400000000000000003n);\n\/\/ ? SyntaxError\n<\/code><\/pre>\n<\/div>\n<p>Keep in mind that you can\u2019t use the strict equality operator to compare a <code>BigInt<\/code> to a regular number because they are not of the same type:<\/p>\n<pre><code>console.log(10n === 10);    \/\/ ? false\n\nconsole.log(typeof 10n);    \/\/ ? bigint\nconsole.log(typeof 10);     \/\/ ? number\n<\/code><\/pre>\n<div><\/div>\n<p>Instead, you can use the equality operator, which performs implicit type conversion before compering its operands:<\/p>\n<pre><code>console.log(10n == 10);    \/\/ ? true\n<\/code><\/pre>\n<p>All arithmetic operators can be used on <code>BigInt<\/code>s except for the unary plus (<code>+<\/code>) operator:<\/p>\n<div>\n<pre><code>10n + 20n;    \/\/ ? 30n\n10n - 20n;    \/\/ ? -10n\n+10n;         \/\/ ? TypeError: Cannot convert a BigInt value to a number\n-10n;         \/\/ ? -10n\n10n * 20n;    \/\/ ? 200n\n20n \/ 10n;    \/\/ ? 2n\n23n % 10n;    \/\/ ? 3n\n10n ** 3n;    \/\/ ? 1000n\n\nconst x = 10n;\n++x;          \/\/ ? 11n\n--x;          \/\/ ? 9n\n<\/code><\/pre>\n<\/div>\n<p>The reason that the unary plus (<code>+<\/code>) operator is not supported is that some programs may rely on the invariant that <code>+<\/code> always produces a <code>Number<\/code>, or throws an exception. Changing the behavior of <code>+<\/code> would also break asm.js code.<\/p>\n<p>Naturally, when used with <code>BigInt<\/code> operands, arithmetic operators are expected to return a <code>BigInt<\/code> value. Therefore, the result of the division (<code>\/<\/code>) operator is automatically rounded down to the nearest integer. For example:<\/p>\n<pre><code>25 \/ 10;      \/\/ ? 2.5\n25n \/ 10n;    \/\/ ? 2n\n<\/code><\/pre>\n<h3>Implicit Type Conversion<\/h3>\n<p>Because implicit type conversion could lose information, mixed operations between <code>BigInt<\/code>s and <code>Number<\/code>s are not allowed. When mixing large integers and floating-point numbers, the resulting value may not be accurately representable by <code>BigInt<\/code> or <code>Number<\/code>. Consider the following example:<\/p>\n<pre><code>(9007199254740992n + 1n) + 0.5\n<\/code><\/pre>\n<p>The result of this expression is outside of the domain of both <code>BigInt<\/code> and <code>Number<\/code>. A <code>Number<\/code> with a fractional part cannot be accurately converted to a <code>BigInt<\/code>. And a <code>BigInt<\/code> larger than 2<sup>53<\/sup> cannot be accurately converted to a <code>Number<\/code>.<\/p>\n<p>As a result of this restriction, it\u2019s not possible to perform arithmetic operations with a mix of  <code>Number<\/code> and <code>BigInt<\/code> operands. You also cannot pass a <code>BigInt<\/code> to Web APIs and built-in JavaScript functions that expect a <code>Number<\/code>. Attempting to do so will cause a <code>TypeError<\/code>:<\/p>\n<pre><code>10 + 10n;    \/\/ ? TypeError\nMath.max(2n, 4n, 6n);    \/\/ ? TypeError\n<\/code><\/pre>\n<p>Note that relational operators do not follow this rule, as shown in this example:<\/p>\n<pre><code>10n > 5;    \/\/ ? true\n<\/code><\/pre>\n<p>If you want to perform arithmetic computations with <code>BigInt<\/code> and <code>Number<\/code>, you first need to determine the domain in which the operation should be done. To do that, simply convert either of the operands by calling <code>Number()<\/code> or <code>BigInt()<\/code>:<\/p>\n<pre><code>BigInt(10) + 10n;    \/\/ ? 20n\n\/\/ or\n10 + Number(10n);    \/\/ ? 20\n<\/code><\/pre>\n<p>When encountered in a <code>Boolean<\/code> context, <code>BigInt<\/code> is treated similar to <code>Number<\/code>. In other words, a <code>BigInt<\/code> is considered a truthy value as long as it\u2019s not <code>0n<\/code>:<\/p>\n<pre><code>if (5n) {\n    \/\/ this code block will be executed\n}\n\nif (0n) {\n    \/\/ but this code block won't\n}\n<\/code><\/pre>\n<p>No implicit type conversion occurs when sorting an array of <code>BigInt<\/code>s and <code>Number<\/code>s:<\/p>\n<pre><code>const arr = [3n, 4, 2, 1n, 0, -1n];\n\narr.sort();    \/\/ ? [-1n, 0, 1n, 2, 3n, 4]\n<\/code><\/pre>\n<p>Bitwise operators such as <code>|<\/code>, <code>&<\/code>, <code><<<\/code>, <code>>><\/code>, and <code>^<\/code> operate on <code>BigInt<\/code>s in a similar way to <code>Number<\/code>s. Negative numbers are interpreted as infinite-length two\u2019s complement. Mixed operands are not allowed. Here are some examples:<\/p>\n<pre><code>90 | 115;      \/\/ ? 123\n90n | 115n;    \/\/ ? 123n\n90n | 115;     \/\/ ? TypeError\n<\/code><\/pre>\n<div><\/div>\n<h3>The BigInt Constructor<\/h3>\n<p>As with other primitive types, a <code>BigInt<\/code> can be created using a constructor function. The argument passed to <code>BigInt()<\/code> is automatically converted to a <code>BigInt<\/code>, if possible:<\/p>\n<pre><code>BigInt(\"10\");    \/\/ ? 10n\nBigInt(10);      \/\/ ? 10n\nBigInt(true);    \/\/ ? 1n\n<\/code><\/pre>\n<p>Data types and values that cannot be converted throw an exception:<\/p>\n<pre><code>BigInt(10.2);     \/\/ ? RangeError\nBigInt(null);     \/\/ ? TypeError\nBigInt(\"abc\");    \/\/ ? SyntaxError\n<\/code><\/pre>\n<p>You can directly perform arithmetic operations on a <code>BigInt<\/code> created using a constructor:<\/p>\n<pre><code>BigInt(10) * 10n;    \/\/ ? 100n\n<\/code><\/pre>\n<p>When used as operands of the strict equality operator, <code>BigInt<\/code>s created using a constructor are treated similar to regular ones:<\/p>\n<pre><code>BigInt(true) === 1n;    \/\/ ? true\n<\/code><\/pre>\n<h3>Library Functions<\/h3>\n<p>JavaScript provides two library functions for representing <code>BigInt<\/code> values as signed or unsigned integers:<\/p>\n<ul>\n<li><code>BigInt.asUintN(width, BigInt)<\/code>: wraps a <code>BigInt<\/code> between 0 and 2<sup>width<\/sup>-1<\/li>\n<li><code>BigInt.asIntN(width, BigInt)<\/code>: wraps a <code>BigInt<\/code> between -2<sup>width-1<\/sup> and 2<sup>width-1<\/sup>-1<\/li>\n<\/ul>\n<p>These functions are particularly useful when performing 64-bit arithmetic operations. This way you can stay within the intended range.<\/p>\n<h3>Browser Support And Transpiling<\/h3>\n<p>At the time of this writing, Chrome +67 and Opera +54 fully support the <code>BigInt<\/code> data type. Unfortunately, Edge and Safari haven\u2019t implemented it yet. Firefox doesn\u2019t support <code>BigInt<\/code> by default, but it can be enabled by setting <code>javascript.options.bigint<\/code> to <code>true<\/code> in <code>about:config<\/code>. An up-to-date list of supported browsers is available on <a href=\"https:\/\/caniuse.com\/#search=bigint\">Can I use\u2026<\/a>.<\/p>\n<p>Unluckily, transpiling <code>BigInt<\/code> is an <a href=\"https:\/\/github.com\/GoogleChromeLabs\/jsbi#why\">extremely complicated process<\/a>, which incurs hefty run-time performance penalty. It\u2019s also impossible to directly polyfill <code>BigInt<\/code> because the proposal changes the behavior of several existing operators. For now, a better alternative is to use the <a href=\"https:\/\/github.com\/GoogleChromeLabs\/jsbi\">JSBI<\/a> library, which is a pure-JavaScript implementation of the <code>BigInt<\/code> proposal.<\/p>\n<p>This library provides an API that behaves exactly the same as the native <code>BigInt<\/code>. Here\u2019s how you can use JSBI:<\/p>\n<pre><code>import JSBI from '.\/jsbi.mjs';\n\nconst b1 = JSBI.BigInt(Number.MAX_SAFE_INTEGER);\nconst b2 = JSBI.BigInt('10');\n\nconst result = JSBI.add(b1, b2);\n\nconsole.log(String(result));    \/\/ ? '9007199254741001'\n<\/code><\/pre>\n<p>An advantage of using JSBI is that once browser support improves, you won\u2019t need to rewrite your code. Instead, you can automatically compile your JSBI code into native <code>BigInt<\/code> code by using a <a href=\"https:\/\/github.com\/GoogleChromeLabs\/babel-plugin-transform-jsbi-to-bigint\">babel plugin<\/a>. Furthermore, the performance of JSBI is on par with native <code>BigInt<\/code> implementations. You can expect wider browser support for <code>BigInt<\/code> soon.<\/p>\n<h3>Conclusion<\/h3>\n<p><code>BigInt<\/code> is a new data type intended for use when integer values are larger than the range supported by the <code>Number<\/code> data type. This data type allows us to safely perform arithmetic operations on large integers, represent high-resolution timestamps, use large integer IDs, and more without the need to use a library.<\/p>\n<p>It\u2019s important to keep in mind that you cannot perform arithmetic operations with a mix of <code>Number<\/code> and <code>BigInt<\/code> operands. You\u2019ll need to determine the domain in which the operation should be done by explicitly converting either of the operands. Moreover, for compatibility reasons, you are not allowed to use the unary plus (<code>+<\/code>) operator on a <code>BigInt<\/code>.<\/p>\n<p>What do you think? Do you find <code>BigInt<\/code> useful? Let us know in the comments!<\/p>\n<div>\n  <img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/07\/logo-red-16.png?w=900\" alt=\"Smashing Editorial\"><span>(dm, yk, il)<\/span>\n<\/div>\n<\/article>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00 The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important&#8230;<a class=\"moretag\" href=\"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/\"> Read the full article&#8230;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[15,371],"tags":[],"class_list":["post-68387","post","type-post","status-publish","format-standard","hentry","category-general-info","category-user-experience"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"The Essential Guide To JavaScript\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Guest Contribution\"\/>\n\t<meta name=\"keywords\" content=\"general info,user experience\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt | Design for Immersive Technologies\" \/>\n\t\t<meta property=\"og:description\" content=\"The Essential Guide To JavaScript\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-07-23T11:19:12+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-07-23T11:19:12+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt | Design for Immersive Technologies\" \/>\n\t\t<meta name=\"twitter:description\" content=\"The Essential Guide To JavaScript\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#article\",\"name\":\"The Essential Guide To JavaScript\\u2019s Newest Data Type: BigInt | Design for Immersive Technologies\",\"headline\":\"The Essential Guide To JavaScript\\u2019s Newest Data Type: BigInt\",\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/www.taterboy.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/logo-red-16.png\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#articleImage\"},\"datePublished\":\"2019-07-23T04:19:12-07:00\",\"dateModified\":\"2019-07-23T04:19:12-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#webpage\"},\"articleSection\":\"General Info, User Experience\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/general-info\\\/#listItem\",\"name\":\"General Info\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/general-info\\\/#listItem\",\"position\":2,\"name\":\"General Info\",\"item\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/general-info\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#listItem\",\"name\":\"The Essential Guide To JavaScript\\u2019s Newest Data Type: BigInt\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#listItem\",\"position\":3,\"name\":\"The Essential Guide To JavaScript\\u2019s Newest Data Type: BigInt\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/category\\\/general-info\\\/#listItem\",\"name\":\"General Info\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/\",\"name\":\"Guest Contribution\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Guest Contribution\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#webpage\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/\",\"name\":\"The Essential Guide To JavaScript\\u2019s Newest Data Type: BigInt | Design for Immersive Technologies\",\"description\":\"The Essential Guide To JavaScript\\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/2019\\\/07\\\/the-essential-guide-to-javascripts-newest-data-type-bigint\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/author\\\/guestcontribution\\\/#author\"},\"datePublished\":\"2019-07-23T04:19:12-07:00\",\"dateModified\":\"2019-07-23T04:19:12-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/\",\"name\":\"Design for Immersive Technologies\",\"description\":\"User Experience for Games, Virtual Reality (VR) and Augmented\\\/Mixed Reality (AR\\\/MR)\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.taterboy.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt | Design for Immersive Technologies","description":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing","canonical_url":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/","robots":"max-image-preview:large","keywords":"general info,user experience","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#article","name":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt | Design for Immersive Technologies","headline":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt","author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/www.taterboy.com\/blog\/wp-content\/uploads\/2019\/07\/logo-red-16.png","@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#articleImage"},"datePublished":"2019-07-23T04:19:12-07:00","dateModified":"2019-07-23T04:19:12-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#webpage"},"isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#webpage"},"articleSection":"General Info, User Experience"},{"@type":"BreadcrumbList","@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.taterboy.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/general-info\/#listItem","name":"General Info"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/general-info\/#listItem","position":2,"name":"General Info","item":"https:\/\/www.taterboy.com\/blog\/category\/general-info\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#listItem","name":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#listItem","position":3,"name":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt","previousItem":{"@type":"ListItem","@id":"https:\/\/www.taterboy.com\/blog\/category\/general-info\/#listItem","name":"General Info"}}]},{"@type":"Organization","@id":"https:\/\/www.taterboy.com\/blog\/#organization","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","url":"https:\/\/www.taterboy.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author","url":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/","name":"Guest Contribution","image":{"@type":"ImageObject","@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d2aad73eb0f48c67b141e9fc978a0e498969791ed623346e361d02d19775b0bb?s=96&d=mm&r=g","width":96,"height":96,"caption":"Guest Contribution"}},{"@type":"WebPage","@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#webpage","url":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/","name":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt | Design for Immersive Technologies","description":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.taterboy.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/#breadcrumblist"},"author":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"creator":{"@id":"https:\/\/www.taterboy.com\/blog\/author\/guestcontribution\/#author"},"datePublished":"2019-07-23T04:19:12-07:00","dateModified":"2019-07-23T04:19:12-07:00"},{"@type":"WebSite","@id":"https:\/\/www.taterboy.com\/blog\/#website","url":"https:\/\/www.taterboy.com\/blog\/","name":"Design for Immersive Technologies","description":"User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.taterboy.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Design for Immersive Technologies | User Experience for Games, Virtual Reality (VR) and Augmented\/Mixed Reality (AR\/MR)","og:type":"article","og:title":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt | Design for Immersive Technologies","og:description":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing","og:url":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/","article:published_time":"2019-07-23T11:19:12+00:00","article:modified_time":"2019-07-23T11:19:12+00:00","twitter:card":"summary","twitter:title":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt | Design for Immersive Technologies","twitter:description":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigIntThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt Faraz Kelhini 2019-07-22T14:00:59+02:002019-07-23T11:06:23+00:00The BigInt data type aims to enable JavaScript programmers to represent integer values larger than the range supported by the Number data type. The ability to represent integers with arbitrary precision is particularly important when performing"},"aioseo_meta_data":{"post_id":"68387","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"created":"2021-02-07 18:49:03","updated":"2026-08-22 04:09:20","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.taterboy.com\/blog\/category\/general-info\/\" title=\"General Info\">General Info<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tThe Essential Guide To JavaScript\u2019s Newest Data Type: BigInt\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.taterboy.com\/blog"},{"label":"General Info","link":"https:\/\/www.taterboy.com\/blog\/category\/general-info\/"},{"label":"The Essential Guide To JavaScript\u2019s Newest Data Type: BigInt","link":"https:\/\/www.taterboy.com\/blog\/2019\/07\/the-essential-guide-to-javascripts-newest-data-type-bigint\/"}],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8wzr5-hN1","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/68387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/comments?post=68387"}],"version-history":[{"count":0,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/posts\/68387\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/media?parent=68387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/categories?post=68387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taterboy.com\/blog\/wp-json\/wp\/v2\/tags?post=68387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}