Skip to content

Commit 1c553cb

Browse files
author
name
committed
deploy
1 parent 2cc477a commit 1c553cb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Other Style Guides
6262

6363
## Types
6464

65+
*Explains what types are in Javascript*
66+
6567
Programming languages all have built-in data structures, but these often differ from one language to another. This article attempts to list the built-in data structures available in JavaScript and what properties they have. These can be used to build other data structures. Wherever possible, comparisons with other languages are drawn.
6668

6769
<a name="types--primitives"></a><a name="1.1"></a>
@@ -75,6 +77,8 @@ Other Style Guides
7577
- `symbol`
7678
- `bigint`
7779

80+
*Goes over numbers*
81+
7882
```javascript
7983
const foo = 1;
8084
let bar = foo;
@@ -93,6 +97,8 @@ Other Style Guides
9397
- `array`
9498
- `function`
9599

100+
*Goes over arrays*
101+
96102
```javascript
97103
const foo = [1, 2];
98104
const bar = foo;
@@ -111,6 +117,8 @@ Other Style Guides
111117

112118
> Why? This ensures that you can’t reassign your references, which can lead to bugs and difficult to comprehend code.
113119

120+
*Vars and Consts*
121+
114122
```javascript
115123
// bad
116124
var a = 1;
@@ -143,6 +151,8 @@ Other Style Guides
143151
<a name="references--block-scope"></a><a name="2.3"></a>
144152
- [2.3](#references--block-scope) Note that both `let` and `const` are block-scoped, whereas `var` is function-scoped.
145153

154+
*Goes over scopes in Javascript*
155+
146156
```javascript
147157
// const and let only exist in the blocks they are defined in.
148158
{
@@ -164,6 +174,8 @@ Other Style Guides
164174
<a name="objects--no-new"></a><a name="3.1"></a>
165175
- [3.1](#objects--no-new) Use the literal syntax for object creation. eslint: [`no-new-object`](https://eslint.org/docs/rules/no-new-object)
166176

177+
*Goes over objects*
178+
167179
```javascript
168180
// bad
169181
const item = new Object();

0 commit comments

Comments
 (0)