You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// normal for döngüsü kullanarak bir diziyi yineleme
199
191
let len =names.length;
200
192
for(let i =0; i < len; i++){
201
193
console.log(names[i].toUpperCase())
202
194
}
203
-
204
-
205
195
// for of kullanarak bir diziyi yinelemek
206
196
for( constnameof names) {
207
197
console.log(name.toUpperCase())
208
198
}
209
-
210
199
// forEach kullanarak bir diziyi yineleme
211
200
names.forEach((name) =>name.toUpperCase())
212
-
213
-
214
201
constperson= {
215
202
firstName:'Asabeneh',
216
203
lastName:'Yetayeh',
@@ -223,7 +210,6 @@ const person = {
223
210
for(constkeyin person) {
224
211
console.log(key)
225
212
}
226
-
227
213
```
228
214
229
215
#### Nesneler
@@ -245,7 +231,6 @@ const person = {
245
231
for(constkeyin person) {
246
232
console.log(key, person[key])
247
233
}
248
-
249
234
```
250
235
251
236
#### Koşullar
@@ -274,7 +259,6 @@ if (num > 0) {
274
259
275
260
```js
276
261
// if else if else if else
277
-
278
262
let a =0
279
263
if (a >0) {
280
264
console.log(`${a} is a positive number`)
@@ -291,7 +275,6 @@ if (a > 0) {
291
275
// Daha fazla switch kullanımı
292
276
let dayUserInput =prompt('What day is today ?')
293
277
let day =dayUserInput.toLowerCase()
294
-
295
278
switch (day) {
296
279
case'monday':
297
280
console.log('Today is Monday')
@@ -321,7 +304,6 @@ switch (day) {
321
304
322
305
```js
323
306
// ternary (Üçlü)
324
-
325
307
let isRaining =true
326
308
isRaining
327
309
?console.log('You need a rain coat.')
@@ -348,7 +330,6 @@ class Person {
348
330
this.lastName= lastName
349
331
}
350
332
}
351
-
352
333
```
353
334
354
335
Takip ettiğiniz stil kılavuzu ne olursa olsun tutarlı olun. Bazı programlama paradigmalarını ve tasarım modellerini takip edin. Unutmayın, kodunuzu belirli bir düzende veya şekilde yazmazsanız, kodunuzu okumak zor olacaktır. Bu nedenle, okunabilir kod yazarak kendiniz veya kodunuzu okuyacak biri için bir iyilik yapın.
@@ -357,4 +338,4 @@ Takip ettiğiniz stil kılavuzu ne olursa olsun tutarlı olun. Bazı programlama
357
338
358
339
🎉 TEBRİKLER ! 🎉
359
340
360
-
[<< Gün 19](../19_Day_Closures/19_day_closures.md) | [Gün 21 >>](../21_Day_DOM/21_day_dom.md)
341
+
[<< Gün 19](../19_Day_Closures/19_day_closures.md) | [Gün 21 >>](../21_Day_DOM/21_day_dom.md)
0 commit comments