-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day1-Intro to JS
53 lines (36 loc) · 1003 Bytes
/
Day1-Intro to 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
1. Intro to js
2. Node js environment
3. Installation of node js
4. Variables
5. Datatypes
6. Operators
7. Loops
Javascript
- Scripting language
- Loosely Typed
- Object based
- To provide the interactivity to web pages
- Single threaded // keep in hold
- Synchronous operations
- make dynamic pages
- it works Client-side (runs on web browser) and server-side(with the help of nodejs)
Node js
- Working or runtime environment of JS
- Allows to run JS outside browser
- Environment to build the server side apps
- Event Driven and non-blocking IO model
npm - node package manager
- provides modules and packages
- open source
- Community is very vast
Variables in JS
let , var and const
- To store the data (container)
- Values like numbers , strings , symbols , objects , arrays , functions
- ES6 introduced let and const
Scoping of let , var and const
let and const - Block scope
var - global or function scope
var - redeclaration and reinitialisation
let - reinitilisation
const - X