From 81fb2ab549124cc1b77b4a19997f5f9f62f25a12 Mon Sep 17 00:00:00 2001 From: Alexey Chilipenko Date: Tue, 21 Jun 2022 13:07:51 +0300 Subject: [PATCH] Add separation between primitives and objects to the summary --- 1-js/02-first-steps/05-types/article.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/1-js/02-first-steps/05-types/article.md b/1-js/02-first-steps/05-types/article.md index 57e08c3f..22526cff 100644 --- a/1-js/02-first-steps/05-types/article.md +++ b/1-js/02-first-steps/05-types/article.md @@ -263,14 +263,16 @@ Some people prefer `typeof(x)`, although the `typeof x` syntax is much more comm There are 8 basic data types in JavaScript. -- `number` for numbers of any kind: integer or floating-point, integers are limited by ±(253-1). -- `bigint` is for integer numbers of arbitrary length. -- `string` for strings. A string may have zero or more characters, there's no separate single-character type. -- `boolean` for `true`/`false`. -- `null` for unknown values -- a standalone type that has a single value `null`. -- `undefined` for unassigned values -- a standalone type that has a single value `undefined`. -- `object` for more complex data structures. -- `symbol` for unique identifiers. +- Seven primitive data types: + - `number` for numbers of any kind: integer or floating-point, integers are limited by ±(253-1). + - `bigint` for integer numbers of arbitrary length. + - `string` for strings. A string may have zero or more characters, there's no separate single-character type. + - `boolean` for `true`/`false`. + - `null` for unknown values -- a standalone type that has a single value `null`. + - `undefined` for unassigned values -- a standalone type that has a single value `undefined`. + - `symbol` for unique identifiers. +- And one non-primitive data type: + - `object` for more complex data structures. The `typeof` operator allows us to see which type is stored in a variable.