--- title: Array.prototype.values() slug: Web/JavaScript/Reference/Global_Objects/Array/values tags: - Dizi yineleyici - Iterator - JavaScript - metod - prototip translation_of: Web/JavaScript/Reference/Global_Objects/Array/values ---
{{JSRef}}
 

values() methodu dizideki tüm elemanları içeren yeni bir (Dizi yineleyici)  nesnesi döner

var a = ['e', 'l', 'm', 'a'];
var yineleyici = a.values();

console.log(yineleyici.next().value); // e
console.log(yineleyici.next().value); // l
console.log(yineleyici.next().value); // m
console.log(yineleyici.next().value); // a

Sintaks

arr.values()

Dönüş değeri

Yeni bir {{jsxref("Array")}} yineleyici nesne.

Örnekler

for...of loop ile yineleme

var arr = ['e', 'l', 'm', 'a'];
var yineleyici = arr.values();

for (let harf of yineleyici) {
  console.log(harf);
}

Specifications

Specification Status Comment
{{SpecName('ES2015', '#sec-array.prototype.values', 'Array.prototype.values')}} {{Spec2('ES2015')}} Initial definition.
{{SpecName('ESDraft', '#sec-array.prototype.values', 'Array.prototype.values')}} {{Spec2('ESDraft')}}  

Web tarayıcı uyumluluğu

{{Compat("javascript.builtins.Array.values")}}

See also