Sitemap
Andy Dłubak

Andy Dłubak

I design, develop, and test web & mobile apps. Currently, I’m a CTO at Cleria A.S. working with Angular, Django, and most of all people.

Member-only story

The Simple Wonders of JavaScript: Diving into Primitive Values

3 min readSep 9, 2023

--

Imagine you’re playing with a set of building blocks. Some blocks are intricate with multiple parts that can be assembled and disassembled, while others are singular and can’t be broken down any further. In the world of JavaScript, these indivisible blocks are what we call primitive values. Picture this: just like the basic building blocks form the foundation of a grand LEGO masterpiece, JavaScript primitive values are the bedrock upon which more complex structures, like objects and arrays.

Abstract

In this exploration, we’ll journey into:

  • What are Primitive Values?
  • The Seven Primitives of JavaScript: A Deep Dive
  • The Immutable Nature of Primitives
  • Real-World Analogies for Better Understanding

The Essence of Primitive Values

At the heart of JavaScript, primitive values are the most basic units of data. Unlike objects, which can be thought of as containers holding various values, primitives are singular entities that remain unchanged. To drive the point home, let’s walk through each of these primitives, one step at a time.

1. Number: The Mathematical Marvel

--

--

Andy Dłubak
Andy Dłubak

Written by Andy Dłubak

I design, develop, and test web & mobile apps. Currently, I’m a CTO at Cleria A.S. working with Angular, Django, and most of all people.