Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Commit bb2457e

Browse files
committed
finished functions
1 parent d303bcd commit bb2457e

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.vscode/snippets.code-snippets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@
77
],
88
"description": ""
99
}
10+
,
11+
"$": {
12+
"scope": "javascript,typescript",
13+
"prefix": "ii",
14+
"body": [
15+
"` `"
16+
],
17+
"description": ""
18+
}
1019
}

Temeller _2.0/functions/app.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Fonksiyon Tanimlama
2+
function merhaba (){
3+
console.log("Merhaba");
4+
}
5+
6+
merhaba(); // Fonksiyon Çagrisi (Function Call)
7+
8+
// parameter function
9+
10+
function merhaba(name, age){
11+
console.log(`tsim: ${name} Ya$: ${age}`);
12+
}
13+
merhaba("Murat" ,25); // Fonksiyon Cagrisi (Function Call)
14+
15+
// undefined
16+
17+
function merhaba(name = "bilgi yok", age = "bilgi yok"){
18+
console.log(`tsim: ${name} Ya$: ${age}`);
19+
}
20+
merhaba();
21+
22+
// return
23+
24+
function square(x){
25+
return x*x;
26+
}
27+
28+
// return'un altında yazdığınız hiçbir zaman çalışmaz.
29+
30+
// Immediately Invoked Function Expression ( IIFE )
31+
// tanımlandığı yerde çalışan fonksiyon
32+
33+
(function (name){
34+
console. log("Merhaba: " + name);
35+
})("Emrah");
36+
37+
38+
39+
40+

0 commit comments

Comments
 (0)