Skip to content

Instantly share code, notes, and snippets.

@yurtarmehmet
Last active November 11, 2019 11:02
Show Gist options
  • Save yurtarmehmet/63793a15448f171b00095f6dcfd7466b to your computer and use it in GitHub Desktop.
Save yurtarmehmet/63793a15448f171b00095f6dcfd7466b to your computer and use it in GitHub Desktop.
Array İterations Ödev

1 - forEach methodunu kullanarak copy dizisini items dizisinin bir copyası haline getirin.

const items = ['item1', 'item2', 'item3'];
const copy = [];

2 - map methodunu kullanarak "triples" isimli diziyi; yani aşağıdaki dizinin elemanlarının 3 ile çarpımıyla elde edilen diziyi oluşturun.

var numbers = [1, 4, 9];

3 - filter methodunu kullanarak aşağıdaki dizideki elemanlardan sadece 15 den küçük olanlarlıyla oluşan bir dizi oluşturun.

var numbers = [12, 5, 20, 130, 44, 9, 240]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment