-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.js
50 lines (32 loc) · 996 Bytes
/
index2.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
"use strict"
let num=7;//number
//num=seven;//string //error seven is not define
//whenever you use string use " " or '' or `
let numberWhichIWantTOWorkWith=10;
let numberWhichIWantTOWorkWIth=9;
console.log(numberWhichIWantTOWorkWith);
let num2 = 2;//let is a way of declaring a variable
let name1="maithaly";
console.log(name1);
//statically type language
//dynamically type language-javascript
//operations
let numb1=6;
let numb2=1;
console.log(numb1 + numb2);
console.log(numb1 - numb2);
console.log(numb1 * numb2);
console.log(numb1 / numb2);
console.log(numb1 % numb2);
//print value and type of
let x=6;
console.log(x);
console.log(typeof x);
let user="maithaly"
console.log(user, typeof user);
let value="7879";//string
console.log(value,typeof value);
let value2 =Number("9643");//converting string to number tpe
console.log(typeof value2);
let value3 = parseInt("987 Maithaly");
console.log(value3, typeof value3);