// Input array contain some elements.
var array = [ 'a', 'gfg', 'c', 'n' ];
// Here array.values() function is called.
var iterator = array.values();
// Here all the elements of the array is being printed.
for (let elements of iterator) {
console.log(elements);
}