Sunday, February 22, 2026
HomeLanguagesJavascriptJavaScript typedArray.@@iterator

JavaScript typedArray.@@iterator

The typedArray.@@iterator is an inbuilt property in JavaScript which is used to return the initial value of the given typedArray’s element. 

Syntax:

arr[Symbol.iterator]()

Parameters: It does not accept any parameter because it is a property not a function. 

Return value: It returns the array iterator function i.e, values() function by default. 

JavaScript code to show the working of this property: 

javascript




// Constructing a new typedArray with some elements
var A = new Uint8Array([ 5, 10, 15, 20, 25 ]);
  
// Calling iterator() function
var a = A[Symbol.iterator]();
  
// Printing each value of the typedArray
console.log(a.next().value);
console.log(a.next().value);
console.log(a.next().value);
console.log(a.next().value);
console.log(a.next().value);


Output:

5
10
15
20
25
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

1 COMMENT

Most Popular

Dominic
32506 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6882 POSTS0 COMMENTS
Nicole Veronica
12005 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12099 POSTS0 COMMENTS
Shaida Kate Naidoo
7011 POSTS0 COMMENTS
Ted Musemwa
7255 POSTS0 COMMENTS
Thapelo Manthata
6967 POSTS0 COMMENTS
Umr Jansen
6956 POSTS0 COMMENTS