-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.js
More file actions
32 lines (25 loc) · 886 Bytes
/
function.js
File metadata and controls
32 lines (25 loc) · 886 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
say_hello = (name) => console.log(`Hello, ${name} how about you?`);
say_hello(`Mbr-Sagor`);
my_name = val => `My name is: ${val}`;
console.log(my_name("Sagor"));
add_calculation = (a, b) => a + b;
let add = add_calculation(30, 20);
console.log(add);
([num, num2] = [30, 70]) => console.log(num + num2)
({ a, b } = { a: 10, b: 20 }) => a + b;
let sum = (a, b) => a + b;
console.log(sum(20, 80));
about_me = () => {
const name = `My Name is: Bozlur Rosid Sagor`;
let age = 25;
let contact = {
'address': 'Sector 11, Road#10, House#06, Dhaka-Bangladesh',
'phone': '+8801773474709',
'email': '[email protected]'
}
let profession = `Full-stack software engineer`;
let show_all = `Name: ${name}\nAge: ${age}\nContact Infor: ${contact}\nProfession: ${profession}`
return show_all;
}
const about = about_me();
console.log(about);