{"id":4275,"date":"2026-11-07T15:09:00","date_gmt":"2026-11-07T15:09:00","guid":{"rendered":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/"},"modified":"2026-11-09T22:05:20","modified_gmt":"2026-11-09T22:05:20","slug":"javascript-data-types","status":"publish","type":"post","link":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/","title":{"rendered":"JavaScript Data Types: The 8 Types Explained with Examples"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">JavaScript has eight data types. Seven are primitives: <strong>string, number, bigint, boolean, undefined, symbol and null<\/strong>. The eighth is <strong>object<\/strong>, which covers everything else, including arrays, functions, dates and maps. Primitives are simple, unchangeable values; objects are collections of properties that you pass around by reference. You check a value&#8217;s type with <code>typeof<\/code>, with two famous quirks: <code>typeof null<\/code> is <code>\"object\"<\/code>, and functions report <code>\"function\"<\/code> even though they are objects.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"344\" src=\"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types-screenshot-1024x344.png\" alt=\"Terminal showing node printing typeof for a number, bigint, string, boolean, undefined, null, symbol and object\" class=\"wp-image-4277\" srcset=\"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types-screenshot-1024x344.png 1024w, https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types-screenshot-300x101.png 300w, https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types-screenshot-768x258.png 768w, https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types-screenshot.png 1100w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">typeof for each of the 8 JavaScript data types in Node.js; note that typeof null returns &quot;object&quot;<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The eight JavaScript data types at a glance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The list comes from MDN&#8217;s guide to <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Guide\/Data_structures\" target=\"_blank\" rel=\"noopener noreferrer\">JavaScript data types and data structures<\/a>. The <code>typeof<\/code> column is real output from Node.js 24.21.0:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Type<\/th><th>Example<\/th><th><code>typeof<\/code> result<\/th><th>Kind<\/th><\/tr><\/thead><tbody><tr><td>String<\/td><td><code>\"hello\"<\/code><\/td><td>&#8220;string&#8221;<\/td><td>Primitive<\/td><\/tr><tr><td>Number<\/td><td><code>42<\/code>, <code>3.14<\/code><\/td><td>&#8220;number&#8221;<\/td><td>Primitive<\/td><\/tr><tr><td>BigInt<\/td><td><code>9007199254740993n<\/code><\/td><td>&#8220;bigint&#8221;<\/td><td>Primitive<\/td><\/tr><tr><td>Boolean<\/td><td><code>true<\/code><\/td><td>&#8220;boolean&#8221;<\/td><td>Primitive<\/td><\/tr><tr><td>Undefined<\/td><td><code>undefined<\/code><\/td><td>&#8220;undefined&#8221;<\/td><td>Primitive<\/td><\/tr><tr><td>Symbol<\/td><td><code>Symbol(\"id\")<\/code><\/td><td>&#8220;symbol&#8221;<\/td><td>Primitive<\/td><\/tr><tr><td>Null<\/td><td><code>null<\/code><\/td><td>&#8220;object&#8221; (a historical bug)<\/td><td>Primitive<\/td><\/tr><tr><td>Object<\/td><td><code>{a: 1}<\/code>, <code>[1, 2]<\/code>, <code>new Date(0)<\/code><\/td><td>&#8220;object&#8221;<\/td><td>Object<\/td><\/tr><tr><td>Object (function)<\/td><td><code>function f() {}<\/code><\/td><td>&#8220;function&#8221;<\/td><td>Object<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">JavaScript is dynamically typed: a variable has no fixed type, and the same variable can hold a number now and a string later. MDN also calls it weakly typed, meaning it converts types automatically when an operation mixes them, instead of throwing an error. Both facts explain most type bugs you will meet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The seven primitive types<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">String<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Text, written in single quotes, double quotes or backticks (template literals, which can hold <code>${expressions}<\/code>). MDN says strings are stored as UTF-16 code units and are immutable: once created, a string cannot be changed. Methods such as <code>toUpperCase()<\/code> return a new string. In our test, <code>s[0] = \"z\"<\/code> on <code>\"abc\"<\/code> silently did nothing, and <code>s<\/code> was still <code>\"abc\"<\/code>; in strict mode the same line threw <code>TypeError: Cannot assign to read only property '0' of string 'abc'<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Number<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There is no separate integer type. Every number is a double-precision 64-bit IEEE 754 value, which MDN says can only store integers safely between -(2^53 &#8211; 1) and 2^53 &#8211; 1, that is up to <code>Number.MAX_SAFE_INTEGER<\/code>, 9007199254740991. Number also includes three special values: <code>Infinity<\/code>, <code>-Infinity<\/code> and <code>NaN<\/code> (&#8220;not a number&#8221;), which, oddly, has the type &#8220;number&#8221;. Decimal fractions are approximations:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; 0.1 + 0.2\n0.30000000000000004\n&gt; 0.1 + 0.2 === 0.3\nfalse\n&gt; 1 \/ 0\nInfinity\n&gt; NaN === NaN\nfalse\n&gt; Number.isNaN(NaN)\ntrue<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For money, store whole units (paise or cents) as integers rather than decimal amounts, and use <code>Number.isNaN()<\/code> to test for NaN, since NaN is not equal even to itself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">BigInt<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Whole numbers of any size, written with an <code>n<\/code> suffix. MDN describes BigInt as able to represent integers with arbitrary magnitude. The difference shows as soon as you pass 2^53:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; 2 ** 53 + 1\n9007199254740992\n&gt; 2n ** 53n + 1n\n9007199254740993n\n&gt; 1n + 1\nTypeError: Cannot mix BigInt and other types, use explicit conversions<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The plain number version is wrong by one, with no error. This matters on servers: a MySQL <code>BIGINT<\/code> column goes up to 9,223,372,036,854,775,807 (and to 18,446,744,073,709,551,615 unsigned), according to the <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/integer-types.html\" target=\"_blank\" rel=\"noopener noreferrer\">MySQL 8.4 manual<\/a>. Large IDs read into an ordinary JavaScript number can lose their last digits, so keep them as strings or BigInt.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Boolean<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>true<\/code> or <code>false<\/code>. Any value can be turned into a boolean, and the results are not always what you expect: in our test <code>Boolean(\"false\")<\/code> and <code>Boolean([])<\/code> were <code>true<\/code>, while <code>Boolean(\"\")<\/code> and <code>Boolean(0)<\/code> were <code>false<\/code>. A non-empty string is always true, whatever it says.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Undefined and null<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Both mean &#8220;nothing&#8221;, with a difference MDN puts neatly: <code>undefined<\/code> indicates the absence of a value, while <code>null<\/code> indicates the absence of an object. A variable you declared but never assigned, a missing function argument and a missing property are all <code>undefined<\/code>. <code>null<\/code> is what you set on purpose to say &#8220;no value here&#8221;. They are loosely equal (<code>null == undefined<\/code> is <code>true<\/code>) but not strictly equal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>typeof null === \"object\"<\/code> result is a bug from the first version of the language. MDN&#8217;s <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/typeof\" target=\"_blank\" rel=\"noopener noreferrer\">typeof reference<\/a> explains that values were stored with a type tag, the tag for objects was 0, and <code>null<\/code> was the NULL pointer, so it got tag 0 too. A fix was proposed and rejected. To test for null, use <code>value === null<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Symbol<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A unique value, mainly used as an object key that cannot clash with any other key. Two symbols with the same description are still different: <code>Symbol(\"id\") === Symbol(\"id\")<\/code> returned <code>false<\/code>. If you need a shared symbol, <code>Symbol.for(\"id\")<\/code> returns the same one each time (that comparison returned <code>true<\/code>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Objects: everything else<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Plain objects, arrays, functions, dates, maps, sets, regular expressions and class instances are all objects. Two things set them apart from primitives:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>They are mutable.<\/strong> You can add, change and delete properties.<\/li>\n\n\n\n<li><strong>Variables hold a reference.<\/strong> After <code>const o2 = o<\/code>, both names point at the same object, so <code>o2.n = 2<\/code> changed <code>o.n<\/code> as well in our test. To get an independent copy, use <code>structuredClone()<\/code>, which in Node.js 24 also kept a <code>Date<\/code> as a real Date.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><code>typeof<\/code> cannot tell an array from a plain object; both give <code>\"object\"<\/code>. Use <code>Array.isArray(value)<\/code> for arrays and <code>value instanceof Date<\/code> for dates. Classes are functions too: <code>typeof class A {}<\/code> returned <code>\"function\"<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Type conversion: where bugs come from<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Because JavaScript converts types automatically, the same operator can do different things. These lines are from our Node.js run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; \"5\" + 1          \/\/ + with a string joins text\n'51'\n&gt; \"5\" - 1          \/\/ - converts to numbers\n4\n&gt; true + 1\n2\n&gt; \"\" == 0          \/\/ loose equality converts\ntrue\n&gt; \"\" === 0         \/\/ strict equality does not\nfalse\n&gt; Number(\"42px\")\nNaN\n&gt; parseInt(\"42px\", 10)\n42<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Three habits prevent most of these problems:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Use <code>===<\/code> and <code>!==<\/code> instead of <code>==<\/code> and <code>!=<\/code>.<\/li>\n\n\n\n<li>Convert input explicitly. Form fields, query strings and environment variables always arrive as strings; wrap them in <code>Number()<\/code> and check the result with <code>Number.isNaN()<\/code>.<\/li>\n\n\n\n<li>Check for missing values on purpose: <code>value === null<\/code>, <code>value === undefined<\/code>, or <code>value == null<\/code> when you mean either.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Data types and JSON<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If your code sends data to a browser or an API, it goes through JSON, and JSON has fewer types than JavaScript. According to MDN&#8217;s <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/JSON\/stringify\" target=\"_blank\" rel=\"noopener noreferrer\">JSON.stringify reference<\/a>, <code>undefined<\/code>, functions and symbols are dropped from objects (and become <code>null<\/code> in arrays), <code>NaN<\/code> and <code>Infinity<\/code> become <code>null<\/code>, dates become ISO strings, and a BigInt throws. Our test confirmed it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; JSON.stringify({ u: undefined, s: Symbol(\"x\"), n: null, d: new Date(0), nan: NaN })\n'{\"n\":null,\"d\":\"1970-01-01T00:00:00.000Z\",\"nan\":null}'\n&gt; JSON.stringify({ big: 1n })\nTypeError: Do not know how to serialize a BigInt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So a date that goes out as a Date comes back as a string, and a BigInt must be converted (usually to a string) before you send it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quick reference: how to check each type<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>String, number, bigint, boolean, symbol, undefined: <code>typeof value === \"string\"<\/code> and so on.<\/li>\n\n\n\n<li>Null: <code>value === null<\/code>.<\/li>\n\n\n\n<li>Array: <code>Array.isArray(value)<\/code>.<\/li>\n\n\n\n<li>Function: <code>typeof value === \"function\"<\/code>.<\/li>\n\n\n\n<li>Whole number: <code>Number.isInteger(value)<\/code>; safe for exact maths: <code>Number.isSafeInteger(value)<\/code> (it returned <code>false<\/code> for <code>2 ** 53<\/code>).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The same eight types apply in the browser and in Node.js on a server, so the rules above hold wherever your code runs. If you are deploying a Node.js app, our <a href=\"https:\/\/www.ucartz.com\/clients\/knowledgebase\/9332\/npm-Commands-Cheat-Sheet-install-ci-update-run-and-audit.html\">npm commands cheat sheet<\/a> covers installing and running it, <a href=\"https:\/\/www.ucartz.com\/clients\/knowledgebase\/2181\/What-is-JavaScript-Minify-and-Why-to-Use-It.html\">JavaScript minification<\/a> helps front-end code load faster, and a <a href=\"https:\/\/www.ucartz.com\/kvm-vps\">KVM VPS<\/a> gives you full root access to run Node.js and your database side by side.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>The eight JavaScript data types: seven primitives plus objects, typeof results, the null quirk, BigInt, type conversion and JSON, tested in Node.js.<\/p>\n","protected":false},"author":11,"featured_media":4276,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[400,83],"tags":[1149,1147,1087,1152,995,1150,1148,1151],"class_list":["post-4275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-website-development","tag-bigint","tag-data-types","tag-javascript","tag-json","tag-node-js","tag-null","tag-typeof","tag-undefined"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Data Types: The 8 Types Explained with\u2026 | Ucartz<\/title>\n<meta name=\"description\" content=\"The eight JavaScript data types: seven primitives plus objects, typeof results, the null quirk, BigInt, type conversion and JSON, tested in Node.js.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"| Ucartz Blog | Ucartz\" \/>\n<meta property=\"og:description\" content=\"The eight JavaScript data types: seven primitives plus objects, typeof results, the null quirk, BigInt, type conversion and JSON, tested in Node.js.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/\" \/>\n<meta property=\"og:site_name\" content=\"Ucartz Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/UcartzOnline\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-07T15:09:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-09T22:05:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"jijosh at\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"| Ucartz Blog | Ucartz\" \/>\n<meta name=\"twitter:creator\" content=\"@ucartz\" \/>\n<meta name=\"twitter:site\" content=\"@ucartz\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"jijosh at\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/\"},\"author\":{\"name\":\"jijosh at\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/#\\\/schema\\\/person\\\/2eef9f41e897cdc332ba03de30de2be7\"},\"headline\":\"JavaScript Data Types: The 8 Types Explained with Examples\",\"datePublished\":\"2026-11-07T15:09:00+00:00\",\"dateModified\":\"2026-11-09T22:05:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/\"},\"wordCount\":967,\"publisher\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/javascript-data-types.jpg\",\"keywords\":[\"bigint\",\"data types\",\"javascript\",\"json\",\"node.js\",\"null\",\"typeof\",\"undefined\"],\"articleSection\":[\"Tutorials\",\"Website Development\"],\"inLanguage\":\"en-US\"},{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/\",\"url\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/\",\"name\":\"| Ucartz Blog | Ucartz\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/javascript-data-types.jpg\",\"datePublished\":\"2026-11-07T15:09:00+00:00\",\"dateModified\":\"2026-11-09T22:05:20+00:00\",\"description\":\"The eight JavaScript data types: seven primitives plus objects, typeof results, the null quirk, BigInt, type conversion and JSON, tested in Node.js.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/\"]}]},{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/javascript-data-types.jpg\",\"contentUrl\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/javascript-data-types.jpg\",\"width\":1200,\"height\":630,\"caption\":\"JavaScript Data Types: The 8 Types Explained with Examples\"},{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/javascript-data-types\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript Data Types: The 8 Types Explained with Examples\"}]},{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/\",\"name\":\"Ucartz Blog\",\"description\":\"Guides on hosting, servers, streaming and automation\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/#organization\"},\"alternateName\":\"Ucartz\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/#organization\",\"name\":\"Ucartz Online Private Limited\",\"alternateName\":\"Ucartz\",\"url\":\"https:\\\/\\\/www.ucartz.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.ucartz.com\\\/assets\\\/images\\\/brand\\\/logo\\\/ucartz-logo-888x240.png\",\"contentUrl\":\"https:\\\/\\\/www.ucartz.com\\\/assets\\\/images\\\/brand\\\/logo\\\/ucartz-logo-888x240.png\",\"width\":888,\"height\":240,\"caption\":\"Ucartz\"},\"image\":{\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/UcartzOnline\",\"https:\\\/\\\/twitter.com\\\/ucartz\",\"https:\\\/\\\/www.instagram.com\\\/ucartz_com\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/ucartzonline\",\"https:\\\/\\\/github.com\\\/ucartz\",\"https:\\\/\\\/n8n.io\\\/creators\\\/ucartz\\\/\",\"https:\\\/\\\/marketplace.whmcs.com\\\/group\\\/Ucartz\"]},{\"@context\":\"https:\\\/\\\/schema.org\",\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/#\\\/schema\\\/person\\\/2eef9f41e897cdc332ba03de30de2be7\",\"name\":\"jijosh at\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/wp-content\\\/themes\\\/ucartz-blog\\\/assets\\\/images\\\/authors\\\/jijosh-at-112.webp\",\"url\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/wp-content\\\/themes\\\/ucartz-blog\\\/assets\\\/images\\\/authors\\\/jijosh-at-112.webp\",\"contentUrl\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/wp-content\\\/themes\\\/ucartz-blog\\\/assets\\\/images\\\/authors\\\/jijosh-at-112.webp\",\"caption\":\"jijosh at\"},\"description\":\"I am a seasoned web hosting strategist and technical writer at Ucartz, specializing in AI, SEO, GPU servers, cloud infrastructure, and VPS hosting solutions. With over 11 years of experience in the hosting industry, he simplifies complex server technologies into actionable insights for developers, businesses, and tech enthusiasts. From performance benchmarking to real-world deployment guides, I am passionate about helping users choose the right infrastructure for modern workloads like AI, gaming, and automation.\",\"url\":\"https:\\\/\\\/www.ucartz.com\\\/blog\\\/author\\\/jijosh-at\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Data Types: The 8 Types Explained with\u2026 | Ucartz","description":"The eight JavaScript data types: seven primitives plus objects, typeof results, the null quirk, BigInt, type conversion and JSON, tested in Node.js.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/","og_locale":"en_US","og_type":"article","og_title":"| Ucartz Blog | Ucartz","og_description":"The eight JavaScript data types: seven primitives plus objects, typeof results, the null quirk, BigInt, type conversion and JSON, tested in Node.js.","og_url":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/","og_site_name":"Ucartz Blog","article_publisher":"https:\/\/www.facebook.com\/UcartzOnline","article_published_time":"2026-11-07T15:09:00+00:00","article_modified_time":"2026-11-09T22:05:20+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types.jpg","type":"image\/jpeg"}],"author":"jijosh at","twitter_card":"summary_large_image","twitter_title":"| Ucartz Blog | Ucartz","twitter_creator":"@ucartz","twitter_site":"@ucartz","twitter_misc":{"Written by":"jijosh at","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@context":"https:\/\/schema.org","@type":"Article","@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/#article","isPartOf":{"@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/"},"author":{"name":"jijosh at","@id":"https:\/\/www.ucartz.com\/blog\/#\/schema\/person\/2eef9f41e897cdc332ba03de30de2be7"},"headline":"JavaScript Data Types: The 8 Types Explained with Examples","datePublished":"2026-11-07T15:09:00+00:00","dateModified":"2026-11-09T22:05:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/"},"wordCount":967,"publisher":{"@id":"https:\/\/www.ucartz.com\/#organization"},"image":{"@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types.jpg","keywords":["bigint","data types","javascript","json","node.js","null","typeof","undefined"],"articleSection":["Tutorials","Website Development"],"inLanguage":"en-US"},{"@context":"https:\/\/schema.org","@type":"WebPage","@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/","url":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/","name":"| Ucartz Blog | Ucartz","isPartOf":{"@id":"https:\/\/www.ucartz.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/#primaryimage"},"image":{"@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types.jpg","datePublished":"2026-11-07T15:09:00+00:00","dateModified":"2026-11-09T22:05:20+00:00","description":"The eight JavaScript data types: seven primitives plus objects, typeof results, the null quirk, BigInt, type conversion and JSON, tested in Node.js.","breadcrumb":{"@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ucartz.com\/blog\/javascript-data-types\/"]}]},{"@context":"https:\/\/schema.org","@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/#primaryimage","url":"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types.jpg","contentUrl":"https:\/\/www.ucartz.com\/blog\/wp-content\/uploads\/2026\/11\/javascript-data-types.jpg","width":1200,"height":630,"caption":"JavaScript Data Types: The 8 Types Explained with Examples"},{"@context":"https:\/\/schema.org","@type":"BreadcrumbList","@id":"https:\/\/www.ucartz.com\/blog\/javascript-data-types\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ucartz.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript Data Types: The 8 Types Explained with Examples"}]},{"@context":"https:\/\/schema.org","@type":"WebSite","@id":"https:\/\/www.ucartz.com\/blog\/#website","url":"https:\/\/www.ucartz.com\/blog\/","name":"Ucartz Blog","description":"Guides on hosting, servers, streaming and automation","publisher":{"@id":"https:\/\/www.ucartz.com\/#organization"},"alternateName":"Ucartz","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ucartz.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@context":"https:\/\/schema.org","@type":"Organization","@id":"https:\/\/www.ucartz.com\/#organization","name":"Ucartz Online Private Limited","alternateName":"Ucartz","url":"https:\/\/www.ucartz.com\/","logo":{"@type":"ImageObject","@id":"https:\/\/www.ucartz.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.ucartz.com\/assets\/images\/brand\/logo\/ucartz-logo-888x240.png","contentUrl":"https:\/\/www.ucartz.com\/assets\/images\/brand\/logo\/ucartz-logo-888x240.png","width":888,"height":240,"caption":"Ucartz"},"image":{"@id":"https:\/\/www.ucartz.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/UcartzOnline","https:\/\/twitter.com\/ucartz","https:\/\/www.instagram.com\/ucartz_com","https:\/\/www.linkedin.com\/company\/ucartzonline","https:\/\/github.com\/ucartz","https:\/\/n8n.io\/creators\/ucartz\/","https:\/\/marketplace.whmcs.com\/group\/Ucartz"]},{"@context":"https:\/\/schema.org","@type":"Person","@id":"https:\/\/www.ucartz.com\/blog\/#\/schema\/person\/2eef9f41e897cdc332ba03de30de2be7","name":"jijosh at","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ucartz.com\/blog\/wp-content\/themes\/ucartz-blog\/assets\/images\/authors\/jijosh-at-112.webp","url":"https:\/\/www.ucartz.com\/blog\/wp-content\/themes\/ucartz-blog\/assets\/images\/authors\/jijosh-at-112.webp","contentUrl":"https:\/\/www.ucartz.com\/blog\/wp-content\/themes\/ucartz-blog\/assets\/images\/authors\/jijosh-at-112.webp","caption":"jijosh at"},"description":"I am a seasoned web hosting strategist and technical writer at Ucartz, specializing in AI, SEO, GPU servers, cloud infrastructure, and VPS hosting solutions. With over 11 years of experience in the hosting industry, he simplifies complex server technologies into actionable insights for developers, businesses, and tech enthusiasts. From performance benchmarking to real-world deployment guides, I am passionate about helping users choose the right infrastructure for modern workloads like AI, gaming, and automation.","url":"https:\/\/www.ucartz.com\/blog\/author\/jijosh-at\/"}]}},"_links":{"self":[{"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/posts\/4275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/comments?post=4275"}],"version-history":[{"count":1,"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/posts\/4275\/revisions"}],"predecessor-version":[{"id":4278,"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/posts\/4275\/revisions\/4278"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/media\/4276"}],"wp:attachment":[{"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/media?parent=4275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/categories?post=4275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ucartz.com\/blog\/wp-json\/wp\/v2\/tags?post=4275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}