-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.js
More file actions
35 lines (35 loc) · 757 Bytes
/
functions.js
File metadata and controls
35 lines (35 loc) · 757 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
function topla(x, y) {
return x + y;
}
function topla2(x, y) {
return x + y;
}
topla("ab", "ab");
topla2(2, 2);
var topla3 = function (x, y) {
return x + y;
};
console.log(topla(2, 4));
console.log(topla("Ankara", 4));
console.log(topla2(2, 4));
console.log(topla3(4, 8));
function topla4(x, y) {
if (y === void 0) { y = 0; }
return x + y;
}
console.log(topla4(3, 3));
function topla5(x, y) {
if (y) {
return x + y;
}
return x;
}
console.log(topla5(3));
function davetEt(ilkDaveltli) {
var digerleri = [];
for (var _i = 1; _i < arguments.length; _i++) {
digerleri[_i - 1] = arguments[_i];
}
return ilkDaveltli + digerleri.join(" ");
}
console.log(davetEt("Engin", "Derin", "Salih", "Ahmet"));