-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex_37.ts
23 lines (18 loc) · 845 Bytes
/
ex_37.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Large Shirts: Modify the make_shirt() function so that shirts are large by default with a message that reads I love TypeScript. Make a large shirt and a medium shirt with the default message, and a shirt of any size with a different message.
// function make_shirt(size: string, label: string){
// return size + label
// }
// let myFunction = make_shirt("large", " I love Typescript");
// console.log(myFunction);
// // making medium as default
// function make_shirt(label: string, size: string = "Medium"){
// return size + label
// }
// let myFunction = make_shirt(" I love Typescript");
// console.log(myFunction);
// making shirt of any size
function make_shirt(label: string, size: string){
return size + label
}
let myFunction = make_shirt(" any size", " I love Typescript");
console.log(myFunction);