-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.js
More file actions
53 lines (39 loc) · 737 Bytes
/
function.js
File metadata and controls
53 lines (39 loc) · 737 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//syntax
// function name (){}
function org (){
var a=20;
console.log(a);
let b=50;
console.log(b);
let b=50;
console.log(b);
const c=60;
console.log(c);
const c=60;
console.log(c);
}
org();
//function types
//function statemnet and declaration---> paramaters and arguments
function antif (hi){
console.log(hi)
}
antif("javascript");
//function expression or anonymous function
let a=function hello (hi){
console.log (hi)
}
a ("javascrizycoonpt");
let b= function (ammo){
console.log(ammo);
}
b("hello captain");
imediatte invoke function expressions
(function (iife){
console.log(iife);
})("function");
// arrow function
// syntax
// ()=>{}
let d(arrow)=>(console.log(arrow))
d("arrow function")