You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
### Index
4
4
1.[Is JavaScript a dynamically typed language or a statically typed language?](#q1-is-javascript-a-dynamically-typed-language-or-a-statically-typed-language)
5
5
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)
6
7
7
8
### Q1. Is JavaScript a dynamically typed language or a statically typed language?
8
9
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
14
15
a ="Hello";
15
16
console.log(a); // "Hello";
16
17
```
18
+
##
17
19
[Back to Top](#javascript-basics)
18
20
19
21
### Q2. What are the different datatypes in JavaScript? (Most asked)
@@ -31,5 +33,12 @@ console.log(a); // "Hello";
31
33
- Array
32
34
- Object
33
35
- 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. 😉
0 commit comments