Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
name committed Aug 17, 2022
1 parent 2cc477a commit 1c553cb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Other Style Guides

## Types

*Explains what types are in Javascript*

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.

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

*Goes over numbers*

```javascript
const foo = 1;
let bar = foo;
Expand All @@ -93,6 +97,8 @@ Other Style Guides
- `array`
- `function`

*Goes over arrays*

```javascript
const foo = [1, 2];
const bar = foo;
Expand All @@ -111,6 +117,8 @@ Other Style Guides

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

*Vars and Consts*

```javascript
// bad
var a = 1;
Expand Down Expand Up @@ -143,6 +151,8 @@ Other Style Guides
<a name="references--block-scope"></a><a name="2.3"></a>
- [2.3](#references--block-scope) Note that both `let` and `const` are block-scoped, whereas `var` is function-scoped.

*Goes over scopes in Javascript*

```javascript
// const and let only exist in the blocks they are defined in.
{
Expand All @@ -164,6 +174,8 @@ Other Style Guides
<a name="objects--no-new"></a><a name="3.1"></a>
- [3.1](#objects--no-new) Use the literal syntax for object creation. eslint: [`no-new-object`](https://eslint.org/docs/rules/no-new-object)

*Goes over objects*

```javascript
// bad
const item = new Object();
Expand Down

0 comments on commit 1c553cb

Please sign in to comment.