-
Notifications
You must be signed in to change notification settings - Fork 0
/
day43.js
43 lines (22 loc) · 1.69 KB
/
day43.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ***** Important Questions for Interviews
// 1. How to check the Type of Array
const arr = ["Lokesh","Diwakar","Aniket","Ritik"]
console.log(typeof arr);
console.log(Array.isArray(arr));
// 2. Why typeof array is given as Object in Javascript
// 3. Difference Between NodeList and HTMLCollections in Js
// 4. Primitive Vs Reference Datatypes
// 5. Ways to Declare arrays and objects in JavaScript
// 6. Dot vs bracket notation syntax in JavaScript objects
// Dot notation is used to access the properties of an object using the dot operator (.) and in dot notation will only work if the key is a single word (without any spaces), and it is a valid JavaScript identifier.
// Bracket notation is used to access the properties of an object using the bracket notation ([]). In bracket notation, the key can be any string.
// 7. What is GEC (Global Execution Context) in JavaScript
// The Global Execution Context is the default or base execution context in which the JavaScript code runs. It is created before any other execution context and is responsible for executing the global code, which includes global variables, functions, and other statements.
// 8. How Js Code Works
// JavaScript code is executed in a single-threaded, synchronous manner. This means that the code is executed line by line, one statement at a time, in a sequential order. However, JavaScript also has asynchronous capabilities, which allow certain operations to be executed independently of the main execution flow.
// And while Executing the Js Code the following steps are followed:
// 1. The Code must be Error Free
// 2. Scope of Variables are determined
// 3. GEC is created
// 4. Hoisting
// 5. Execution of Code line by line