-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2Datatype.js
51 lines (46 loc) · 963 Bytes
/
2Datatype.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
/* Datatypes in javascript
a - Undefined: typeOf instance === "undefined"
b - Boolean: typeOf instance === "Boolean"
c - Number: typeOf instance === "number"
d - String: typeOf instance === "string"
e - BigInt: typeOf instance === "bigint"
f - Symbol: typeOf instance === "symbol"
*/
var myName = "Kuldeep Singh";
console.log(myName);
console.log(typeof (myName))
var iAmKul = true;
console.log(iAmKul);
console.log(typeof (iAmKul));
var iAmKul1 = 90;
console.log(iAmKul);
console.log(typeof (iAmKul1));
// Some challenge.
console.log(10 + "20");
console.log(10 - "20");
console.log("Java" + "Script");
console.log(" " + " ");
console.log(" " + 0);
console.log("Kuldeep " + "Singh");
console.log(true + true);
console.log(true + false);
console.log(false + false);
console.log(false + true);
/*
Output
Kuldeep Singh
string
true
boolean
true
number
1020
-10
JavaScript
0
Kuldeep Singh
2
1
0
1
*/