forked from engindemirog/javaScriptStarterKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
96 lines (67 loc) · 1.75 KB
/
Copy pathapp.js
File metadata and controls
96 lines (67 loc) · 1.75 KB
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
93
94
95
//console.log("Merhaba Kodlama.io")
let dolarDun = 9.20
let dolarBugun = 9.30
{
let dolarDun=9.10
}
//console.log(dolarDun)
const euroDun=11.2
//euroDun =11 // Eklenemiyor hata verir const da
//console.log(euroDun)
//array
let konutKrediler = ["Konut Kredisi","Emlak konut Kredisi","Kamu Konut Kredisi"]
//let users = getUsersFromApi();
for (let i = 0; i < konutKrediler.length; i++)
{
//console.log( konutKrediler[i])
}
//console.log(konutKrediler)
/////
let student = {id:1, name:"Osman"}
//console.log(student);
function save(ogrenci) {
//console.log(ogrenci)
}
save();//Boş gönderdiginde undefined hatası verir
save(student);
let student2 = {id:1, name:"Osman"}
//console.log(student);
function save2(ogrenci2,puan=50) {
//console.log(ogrenci2.name + " : " +puan)
}
save2(student,100);
save2(student);
let students=["Osman","Ömer","Eda","Ayşe"]
let students2=[student,{id:2,name:"halit"},"Bayburt",{city:"İstanbul"}]
//console.log(students2);
//rest
//params
let showProducts=function (id,...products) {
console.log(id)
console.log(products)
}
//console.log(typeof showProducts)
//showProducts(10,["Elma","Armut","Karpuz"])
//spread
let points = [1,2,3,4,52,45,89,99]
console.log(...points)
console.log(Math.max(...points))
console.log(..."ABC","D",..."EFG","H")
//Destructuring
let populations=[10000,20000,30000,[40000,100000]]
let [small,medium,high,[veryhigh,maximum]]=populations
console.log(small)
console.log(medium)
console.log(high)
console.log(veryhigh)
console.log(maximum)
function someFunction([Small1],number) {
console.log(Small1)
}
someFunction(populations)
let category = {id:1,name:"İçecek"}
console.log(category.id)
console.log(category.name)
let{id,name}=category
console.log(id)
console.log(name)