{"id":1288,"date":"2021-02-18T07:51:27","date_gmt":"2021-02-18T07:51:27","guid":{"rendered":"https:\/\/www.projectimmerse.com\/blog\/?p=1288"},"modified":"2025-09-29T09:55:38","modified_gmt":"2025-09-29T09:55:38","slug":"javascript-objects-vs-primitives-what-every-developer-should-know","status":"publish","type":"post","link":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/","title":{"rendered":"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png\" alt=\"Flat illustration of two developers under the heading JavaScript Objects vs Primitives with projectimmerse.com watermark\" class=\"wp-image-1308\" srcset=\"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png 1024w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse-300x300.png 300w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse-150x150.png 150w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse-768x768.png 768w, https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse-100x100.png 100w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption class=\"wp-element-caption\"><em>Introducing the key differences between JavaScript objects and primitives.<\/em><br><\/figcaption><\/figure>\n\n\n\n<p>JavaScript has two foundational types of values: <strong>primitives<\/strong> and <strong>objects<\/strong>. Though this sounds simple, misunderstanding their behavior leads to subtle bugs, performance issues, and confusion \u2014 especially when passing values around, mutating data, or optimizing code. Let\u2019s dive deeper into what separates them, with clear examples and best practices.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">What Are Primitives in JavaScript?<\/h2>\n\n\n\n<p>Primitives are the basic building blocks of data in JavaScript. They include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>string<\/code><\/li>\n\n\n\n<li><code>number<\/code><\/li>\n\n\n\n<li><code>boolean<\/code><\/li>\n\n\n\n<li><code>undefined<\/code><\/li>\n\n\n\n<li><code>null<\/code><\/li>\n\n\n\n<li><code>symbol<\/code><\/li>\n\n\n\n<li><code>bigint<\/code><\/li>\n<\/ul>\n\n\n\n<p>These are <strong>immutable<\/strong> \u2014 once created, their value cannot be changed. When you assign a primitive to another variable, JavaScript <strong>copies the value<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet a = 10;\nlet b = a;\nb = 20;\n\nconsole.log(a); \/\/ 10\nconsole.log(b); \/\/ 20\n\n<\/pre><\/div>\n\n\n<p>In this example, <code>b<\/code> got a <strong>copy<\/strong> of the primitive <code>10<\/code>. Changing <code>b<\/code> doesn\u2019t affect <code>a<\/code>.<\/p>\n\n\n\n<p>Because primitives are stored by value, comparisons like <code>===<\/code> check if two variables hold the same primitive value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Are Objects (and Functions)?<\/h2>\n\n\n\n<p>Objects are collections of key-value pairs. Arrays, functions, and even <code>Date<\/code> instances are all objects in JavaScript. Unlike primitives, objects are <strong>mutable<\/strong>, and when you assign an object to a new variable, you\u2019re copying a <strong>reference<\/strong>, not duplicating the object.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet obj1 = { name: \"Alice\", age: 25 };\nlet obj2 = obj1;\n\nobj2.age = 30;\n\nconsole.log(obj1.age); \/\/ 30\nconsole.log(obj2.age); \/\/ 30\n\n<\/pre><\/div>\n\n\n<p>Both <code>obj1<\/code> and <code>obj2<\/code> refer to the <strong>same object in memory<\/strong>. Changing a property via <code>obj2<\/code> also affects <code>obj1<\/code>.<\/p>\n\n\n\n<p>Because of this reference behavior, deleting or mutating properties affects all references to that object. Cloning must be done explicitly (using spread syntax, <code>Object.assign<\/code>, or deep-copy utilities). Functions are also objects, which means they can carry properties and be passed by reference.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Differences Illustrated Together<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Primitives<\/th><th>Objects<\/th><\/tr><\/thead><tbody><tr><td>Storage<\/td><td>Value directly stored in variable<\/td><td>Stored in memory; variable holds reference<\/td><\/tr><tr><td>Copy behavior<\/td><td>By value (clone)<\/td><td>By reference (alias)<\/td><\/tr><tr><td>Mutability<\/td><td>Immutable<\/td><td>Mutable<\/td><\/tr><tr><td>Equality (<code>===<\/code>)<\/td><td>Compares value<\/td><td>Compares reference (unless same object)<\/td><\/tr><tr><td>Use cases<\/td><td>Simple data (flags, counters, strings)<\/td><td>Collections, methods, complex data structures<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Common Pitfalls and Gotchas<\/h2>\n\n\n\n<p><strong>Unintentional sharing:<\/strong> Passing objects around can lead to unexpected mutations in different parts of your code.<\/p>\n\n\n\n<p><strong>Shallow copy vs deep copy:<\/strong> Using <code>{ ...obj }<\/code> only copies top-level properties. Nested objects remain shared references.<\/p>\n\n\n\n<p><strong>Comparisons:<\/strong> Two distinct objects with identical contents are not equal.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{} === {} \/\/ false\n{ x: 1 } === { x: 1 } \/\/ false\n\n<\/pre><\/div>\n\n\n<p><strong>Boxing primitives:<\/strong> JavaScript sometimes wraps primitives in temporary object form (e.g., calling string methods). These wrappers are ephemeral and not the same as true objects.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices and Tips<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>primitives<\/strong> for simple data when possible; they\u2019re safer and faster.<\/li>\n\n\n\n<li>Avoid mutating objects directly unless you really intend to. Favor immutability and cloning.<\/li>\n\n\n\n<li>For nested structures, use <strong>deep-copy utilities<\/strong> such as <code>structuredClone<\/code> or <code>lodash.cloneDeep<\/code>.<\/li>\n\n\n\n<li>Watch for default parameters that share object references across function calls.<\/li>\n\n\n\n<li>If you want objects to be immutable, use <code>Object.freeze()<\/code> or deep freeze patterns.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>Understanding <strong>objects vs primitives<\/strong> is foundational to writing predictable JavaScript. When you know how and when data is copied or shared, you can structure your programs with more confidence and avoid subtle bugs. Mastering this distinction makes your codebase more reliable, readable, and easier to maintain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript has two foundational types of values: primitives and objects. Though this sounds simple, misunderstanding their behavior leads to subtle bugs, performance issues, and confusion \u2014 especially when passing values around, mutating data, or optimizing code. Let\u2019s dive deeper into what separates them, with clear examples and best practices.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"class_list":["post-1288","post","type-post","status-publish","format-standard","hentry","category-programming-fundamentals"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know - Project Immerse<\/title>\n<meta name=\"description\" content=\"Understand the key differences between JavaScript primitives and objects, how they\u2019re stored, passed, and mutated \u2014 and avoid common pitfalls in your JS code.\" \/>\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.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know - Project Immerse\" \/>\n<meta property=\"og:description\" content=\"Understand the key differences between JavaScript primitives and objects, how they\u2019re stored, passed, and mutated \u2014 and avoid common pitfalls in your JS code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/\" \/>\n<meta property=\"og:site_name\" content=\"Project Immerse\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-18T07:51:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-29T09:55:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"projectimmerse\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"projectimmerse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/\"},\"author\":{\"name\":\"projectimmerse\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"headline\":\"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know\",\"datePublished\":\"2021-02-18T07:51:27+00:00\",\"dateModified\":\"2025-09-29T09:55:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/\"},\"wordCount\":468,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png\",\"articleSection\":[\"Programming Fundamentals\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/\",\"name\":\"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know - Project Immerse\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png\",\"datePublished\":\"2021-02-18T07:51:27+00:00\",\"dateModified\":\"2025-09-29T09:55:38+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\"},\"description\":\"Understand the key differences between JavaScript primitives and objects, how they\u2019re stored, passed, and mutated \u2014 and avoid common pitfalls in your JS code.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png\",\"contentUrl\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png\",\"width\":1024,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/javascript-objects-vs-primitives-what-every-developer-should-know\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/\",\"name\":\"Project Immerse\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/#\\\/schema\\\/person\\\/c53f2864be524ee6fa08a7e4800dd1e5\",\"name\":\"projectimmerse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g\",\"caption\":\"projectimmerse\"},\"url\":\"https:\\\/\\\/www.projectimmerse.com\\\/blog\\\/author\\\/projectimmerse\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know - Project Immerse","description":"Understand the key differences between JavaScript primitives and objects, how they\u2019re stored, passed, and mutated \u2014 and avoid common pitfalls in your JS code.","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.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know - Project Immerse","og_description":"Understand the key differences between JavaScript primitives and objects, how they\u2019re stored, passed, and mutated \u2014 and avoid common pitfalls in your JS code.","og_url":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/","og_site_name":"Project Immerse","article_published_time":"2021-02-18T07:51:27+00:00","article_modified_time":"2025-09-29T09:55:38+00:00","og_image":[{"width":1024,"height":1024,"url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png","type":"image\/png"}],"author":"projectimmerse","twitter_card":"summary_large_image","twitter_misc":{"Written by":"projectimmerse","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#article","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/"},"author":{"name":"projectimmerse","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"headline":"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know","datePublished":"2021-02-18T07:51:27+00:00","dateModified":"2025-09-29T09:55:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/"},"wordCount":468,"commentCount":0,"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png","articleSection":["Programming Fundamentals"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/","url":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/","name":"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know - Project Immerse","isPartOf":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#primaryimage"},"image":{"@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#primaryimage"},"thumbnailUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png","datePublished":"2021-02-18T07:51:27+00:00","dateModified":"2025-09-29T09:55:38+00:00","author":{"@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5"},"description":"Understand the key differences between JavaScript primitives and objects, how they\u2019re stored, passed, and mutated \u2014 and avoid common pitfalls in your JS code.","breadcrumb":{"@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#primaryimage","url":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png","contentUrl":"https:\/\/www.projectimmerse.com\/blog\/wp-content\/uploads\/2021\/02\/javascript-objects-vs-primitives-clean-illustration-projectimmerse.png","width":1024,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/www.projectimmerse.com\/blog\/javascript-objects-vs-primitives-what-every-developer-should-know\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.projectimmerse.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript: Objects vs Primitives \u2014 What Every Developer Should Know"}]},{"@type":"WebSite","@id":"https:\/\/www.projectimmerse.com\/blog\/#website","url":"https:\/\/www.projectimmerse.com\/blog\/","name":"Project Immerse","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.projectimmerse.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.projectimmerse.com\/blog\/#\/schema\/person\/c53f2864be524ee6fa08a7e4800dd1e5","name":"projectimmerse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d06955033d6227bfdcf30014e457e4334f7deeb73907de49b65ec2484921931?s=96&d=mm&r=g","caption":"projectimmerse"},"url":"https:\/\/www.projectimmerse.com\/blog\/author\/projectimmerse\/"}]}},"_links":{"self":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/1288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/comments?post=1288"}],"version-history":[{"count":10,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/1288\/revisions"}],"predecessor-version":[{"id":1311,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/posts\/1288\/revisions\/1311"}],"wp:attachment":[{"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/media?parent=1288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/categories?post=1288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.projectimmerse.com\/blog\/wp-json\/wp\/v2\/tags?post=1288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}