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
**Q1. Is javascript a dynamically typed language or a statically typed language ?**
2
-
Javascript is a dynamically typed language.
3
-
It means all type checks are done at run time ( When program is executing )
4
-
So, we can just assign anything to the variable and it works fine.
1
+
## JavaScript Basics
5
2
6
-
let a;
7
-
a = 0;
8
-
console.log(a) // 0
9
-
a = "Hello"
10
-
console.log(a) // "Hello"
11
-
12
-
**Q2. What are the different datatypes in javascript ? (Most asked)**
13
-
Primitive datatypes:
14
-
String
15
-
number
16
-
boolean
17
-
null
18
-
undefined
19
-
Bigint
20
-
symbol
21
-
Non-Primitive datatypes:
22
-
Array
23
-
Object
24
-
Date
3
+
### Index
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
+
2.[What are the different datatypes in JavaScript?](#q2-what-are-the-different-datatypes-in-javascript-most-asked)
6
+
7
+
### Q1. Is JavaScript a dynamically typed language or a statically typed language?
8
+
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.
9
+
10
+
```javascript
11
+
let a;
12
+
a =0;
13
+
console.log(a); // 0
14
+
a ="Hello";
15
+
console.log(a); // "Hello";
16
+
```
17
+
[Back to Top](#javascript-basics)
18
+
19
+
### Q2. What are the different datatypes in JavaScript? (Most asked)
0 commit comments