File tree 3 files changed +115
-0
lines changed
3 files changed +115
-0
lines changed Original file line number Diff line number Diff line change
1
+ var a = 5 ;
2
+ console . log ( a ) ;
3
+
4
+
5
+ var numbers = [ 1 , 4 , 5 , 7 ] ;
6
+ var person = { } ;
7
+ person . name = "abhishek" ;
8
+ person . age = 23 ;
9
+ person . phones = [ "9414014444" , "86666666666" ]
10
+ person . address = { }
11
+ person . address . street = "hari marg"
12
+ person . address . city = "jaipur"
13
+ person . address . pincode = 302017
14
+ person . speak = function ( ) {
15
+ console . log ( "hello" )
16
+ }
17
+
18
+ person . speak ( ) ;
19
+
20
+ console . log ( person ) ;
21
+
22
+ person . phones . push ( "8888888888" ) ;
23
+
24
+ // numbers.push(8);
25
+ // numbers.pop()
26
+ var deleted = numbers . splice ( 1 , 2 , "hello" ) ;
27
+ console . log ( numbers )
28
+ console . log ( deleted )
29
+ numbers . reverse ( )
30
+ console . log ( numbers )
31
+ var joinedString = numbers . join ( ":" ) ;
32
+ console . log ( joinedString )
33
+
34
+ splittedString = joinedString . split ( ":" ) ;
35
+ console . log ( splittedString ) ;
36
+ //concat function
37
+ //reference variables
38
+
39
+ //callback function
40
+
41
+ var sum = function ( a , b ) {
42
+ console . log ( "sum" ) ;
43
+ return a + b ;
44
+ }
45
+
46
+
47
+ var operation = function ( fx , x , y ) {
48
+ console . log ( fx )
49
+ return fx ( x , y )
50
+ }
51
+
52
+
53
+ var r = operation ( sum , 5 , 6 ) ;
54
+ var w = operation ( diff , 5 , 6 ) ;
55
+
56
+
57
+ //Hoisting
58
+ function diff ( a , b ) {
59
+ return a - b ;
60
+ }
61
+
62
+
63
+
64
+ console . log ( r , w ) ;
65
+
66
+ //Date
67
+ //Random
68
+ //Timeout
69
+
70
+
71
+ setTimeout ( sum , 2000 )
72
+ console . log ( "end" ) ;
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
Original file line number Diff line number Diff line change
1
+ < html >
2
+ < head >
3
+ < script src ="app.js "> </ script >
4
+ </ head >
5
+ < body >
6
+
7
+ < form action ="submit.php ">
8
+ < input type ="text " name ="username " value ="abc ">
9
+ < input type ="number " name ="age ">
10
+ < input type ="password " name ="pass ">
11
+ < input type ="email " name ="username ">
12
+ < input type ="file ">
13
+ < input type ="submit ">
14
+ < input type ="tel ">
15
+ C < input type ="checkbox " name ="sports[] " value ="cricket ">
16
+ H< input type ="checkbox " name ="sports[] " value ="hocket ">
17
+ F < input type ="checkbox " name ="sports[] " value ="footbal ">
18
+ < input type ="radio ">
19
+ < textarea name ="" id ="" cols ="30 " rows ="2 "> </ textarea >
20
+ < select name ="" id ="">
21
+ < option value ="india "> India</ option >
22
+ < option value ="sl "> Sri Lanka</ option >
23
+ </ select >
24
+ </ form >
25
+
26
+
27
+
28
+
29
+ </ body >
30
+ </ html >
Original file line number Diff line number Diff line change
1
+ Subproject commit b09f68bc13267b0fc32fb804da39c6303b3d98db
You can’t perform that action at this time.
0 commit comments