-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
92 lines (66 loc) · 2.12 KB
/
main.ts
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// let toAge=18;
// let message = toAge >= 18 ? "you are allowed" : "you are not allowed";
// console.log(`he ${message}`);
// The include more turnuary operators is used first used one by one work ? ,: ,? ,:,?. :
// function strenght(){
// return "hello my power";
// }
// let myMessage = strenght();
// console.log(myMessage);
// function percentage() {
// return 7 % 6
// }
// let answer = percentage();
// console.log(answer);
// function paper() {
// return "Passed";
// }
// let newpaper = paper();
// if (newpaper === "Failed") {
// console.log("You failed the paper.");
// } else {
// console.log("You passed the paper.");
// }
// function sum(num1: number, num2: number){
// return num1 + num2
// }
// let result = sum(20, 10)
// console.log(result);
// *********************************************************
// function subtract(num1: number, num2: number){
// return num1 - num2
// }
// let announced = subtract(20, 10)
// console.log(announced);
// ***********************************************************
// function multiply(num1: number, num2: number){
// return num1 * num2
// }
// let announced = multiply(20, 10)
// console.log(announced);
// ************************************************************
// function divide(num1: number, num2: number){
// return num1 / num2
// }
// let announced = divide(20, 10)
// console.log(announced);
// *************************************************************8
// function percentage(num1: number, num2: number){
// return num1 % num2
// }
// let announced = percentage(2, 10)
// console.log(announced);
// ****************************************************************
// FUNCTION & PARAMETERS
// function greet(m1: string, m2: string){
// return m1 + m2
// }
// let message = greet("hello", "brothre");
// console.log(message)
// **********************************************
// // OPTIONAL VALUE
// function greet(m1: string, m2= "world"){
// return m1 + m2
// }
// let message = greet("hello");
// console.log(message)