-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctionPartTwo.js
More file actions
37 lines (29 loc) · 810 Bytes
/
functionPartTwo.js
File metadata and controls
37 lines (29 loc) · 810 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
// console.log("hello world");
// function calculateCartPrice(...num1) {
// return num1;
// }
// console.log(calculateCartPrice(500, 200, 1000, 1500));
function calculateCartPrice(val1, val2, ...num1) {
return val1, val2, num1;
}
//console.log(calculateCartPrice(500, 200, 1000, 1500));
const user = {
name: "Waseem akram",
age: 20,
};
function intro(theobj) {
console.log(`hello my name is ${theobj.name} and my age is : ${theobj.age}`);
}
// intro(user)
// intro({
// name: "hafiz fahad iqbal",
// age: 47,
// });
const fruit=["banana","peach","mango","strawberry"];
function listOfFruits(thearr){
console.log(`The list of fruits : ${thearr}`)
}
// listOfFruits(fruit)
listOfFruits([
"banana","peach","mango","strawberry"
])