Untitled
unknown
plain_text
10 months ago
290 B
19
Indexable
const ogrenci = {
ad: "Arda",
soyad: "Karadağ",
notlar: [85, 90, 78, 92],
ortalamaHesapla: function() {
const toplam = this.notlar.reduce((acc, val) => acc + val, 0);
return toplam / this.notlar.length;
}
};
console.log("Ortalama:", ogrenci.ortalamaHesapla());Editor is loading...
Leave a Comment