Skip to content

Commit 8944188

Browse files
authored
Update README.md
1 parent 55d088d commit 8944188

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Index
44
1. [Is JavaScript a dynamically typed language or a statically typed language?](#q1-is-javascript-a-dynamically-typed-language-or-a-statically-typed-language)
55
2. [What are the different datatypes in JavaScript?](#q2-what-are-the-different-datatypes-in-javascript-most-asked)
6+
3. [ What is Hoisting in javascript ? (Most asked)](#q3)
67

78
### Q1. Is JavaScript a dynamically typed language or a statically typed language?
89
JavaScript is a dynamically typed language. It means all type checks are done at runtime (when the program is executing). So, we can just assign anything to the variable and it works fine.
@@ -14,6 +15,7 @@ console.log(a); // 0
1415
a = "Hello";
1516
console.log(a); // "Hello";
1617
```
18+
##
1719
[Back to Top](#javascript-basics)
1820

1921
### Q2. What are the different datatypes in JavaScript? (Most asked)
@@ -31,5 +33,12 @@ console.log(a); // "Hello";
3133
- Array
3234
- Object
3335
- Date
34-
;
36+
##
37+
[Back to Top](#javascript-basics)
38+
39+
### Q3. What is Hoisting in javascript ? (Most asked)
40+
- In other scripting/server side languages, variables or functions must be declared before using it.
41+
- In javascript, variables and functions can be used before declaring it. The javascript compiler moves all the declarations of variables and functions on top. so there will not be any error. This is called hoisting.
42+
#### 👉 Interview Tip: Mention buzz word 'temporal dead zone' for let & const in above answer so that interviewer will ask What is temporal dead zone. 😉
43+
##
3544
[Back to Top](#javascript-basics)

0 commit comments

Comments
 (0)