Skip to content

Commit

Permalink
updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adityaguptaofficial committed Apr 15, 2024
1 parent c25bce8 commit 3e6c812
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ Other Style Guides
<a name="types--primitives"></a><a name="1.1"></a>
- [1.1](#types--primitives) **Primitives**: When you access a primitive type you work directly on its value.

- `string`
- `number`
- `boolean`
- `String`
- `Number`
- `Boolean`
- `null`
- `undefined`
- `symbol`
- `bigint`
- `Undefined`
- `Symbol`
- `Bigint`

<br />

Expand Down Expand Up @@ -136,7 +136,7 @@ Other Style Guides
}

// good, use the let.
let count = 1;
let count = 0;
if (true) {
count += 1;
}
Expand Down Expand Up @@ -692,7 +692,7 @@ Other Style Guides
// immediately-invoked function expression (IIFE)
(function () {
console.log('Welcome to the Internet. Please follow me.');
}());
}());/*here semicolon is Imp. because when you write again IIFE statement otherwise it will gives you a Error*/
```

<a name="functions--in-blocks"></a><a name="7.3"></a>
Expand Down Expand Up @@ -1990,6 +1990,7 @@ Other Style Guides
// The variables 'a' and 'b' are in a Temporal Dead Zone where JavaScript
// knows they exist (declaration is hoisted) but they are not accessible
// (as they are not yet initialized).
//Temporal Dead Zone :- the period of time between the start of a scope and the moment when a variable declared with let or const is initialized. During this time, the variable is not accessible.

console.log(a); // ReferenceError: Cannot access 'a' before initialization
console.log(b); // ReferenceError: Cannot access 'b' before initialization
Expand Down Expand Up @@ -2104,6 +2105,11 @@ Other Style Guides

// good
switch (foo) {
/*
default: {
class C {} // in starting of switch case also written a default statement
}
*/
case 1: {
let x = 1;
break;
Expand Down

0 comments on commit 3e6c812

Please sign in to comment.