-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariable.js
More file actions
39 lines (33 loc) · 820 Bytes
/
variable.js
File metadata and controls
39 lines (33 loc) · 820 Bytes
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
// varibles & datatypes
//string
var person= "john";
let person1 ="smith";
document.write(typeof person1)
document.write("<br>") //for next line
document.write(person);
document.write("<br>") //for next line
//number
var number = 10;
var number1 = 20.33;
document.write(typeof number)
document.write("<br>") //for next line
document.write(number1);
document.write("<br>") //for next line
//boolean
var js=true;
var html=false;
document.write(typeof html)
document.write("<br>") //for next line
document.write(html);
document.write("<br>") //for next line
//undefined
var test1;
document.write(typeof test1)
document.write("<br>") //for next line
document.write(test1);
//null
var test2=null;
document.write("<br>") //for next line
//constant
const pi=3.14;
document.write(pi);