-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunction.js
More file actions
29 lines (24 loc) · 968 Bytes
/
Copy pathFunction.js
File metadata and controls
29 lines (24 loc) · 968 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
// function:
// funtion are reusable block of code designed to perform specific task
// there are mainly two types
// 1.build in function:
// function are provided by js itself which are called as a built in function eg.
// let num = parseInt('1000')
// console.log(num)
// console.log(typeof(num))
// console.log(Date.now());
// 2.user defined function:
// which function are developed by user to perform specific task those function are called as a user definde function
// syntax
// 1.non parametrized function
function greet () {
return `Hey there!`
console.log(`Hello there!`)
}
let result = greet()
// console.log(result)
// 2.parameterized function
function greet1 (name) {
return `hey ${name}`
}
// console.log(greet1("Alex"))