Skip to content

Commit fd1278e

Browse files
authored
Merge pull request #3075 from chilipenko/1-02-05-data-types-separation
Add separation between primitives and objects to the summary
2 parents 759a730 + 81fb2ab commit fd1278e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

1-js/02-first-steps/05-types/article.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,16 @@ Some people prefer `typeof(x)`, although the `typeof x` syntax is much more comm
263263
264264
There are 8 basic data types in JavaScript.
265265
266-
- `number` for numbers of any kind: integer or floating-point, integers are limited by <code>±(2<sup>53</sup>-1)</code>.
267-
- `bigint` is for integer numbers of arbitrary length.
268-
- `string` for strings. A string may have zero or more characters, there's no separate single-character type.
269-
- `boolean` for `true`/`false`.
270-
- `null` for unknown values -- a standalone type that has a single value `null`.
271-
- `undefined` for unassigned values -- a standalone type that has a single value `undefined`.
272-
- `object` for more complex data structures.
273-
- `symbol` for unique identifiers.
266+
- Seven primitive data types:
267+
- `number` for numbers of any kind: integer or floating-point, integers are limited by <code>±(2<sup>53</sup>-1)</code>.
268+
- `bigint` for integer numbers of arbitrary length.
269+
- `string` for strings. A string may have zero or more characters, there's no separate single-character type.
270+
- `boolean` for `true`/`false`.
271+
- `null` for unknown values -- a standalone type that has a single value `null`.
272+
- `undefined` for unassigned values -- a standalone type that has a single value `undefined`.
273+
- `symbol` for unique identifiers.
274+
- And one non-primitive data type:
275+
- `object` for more complex data structures.
274276
275277
The `typeof` operator allows us to see which type is stored in a variable.
276278

0 commit comments

Comments
 (0)