for … of

for … of

Description

for (mixed variable of object object)

Parameters

Name Description Type Default Optional
variable mixed No
object object No

Changelog

Version Description
ES 6 Introduced.

Examples

Example #1 – for … in example

Iteration between two values.

var obj = ['Foo', 'Bar']; for (var prop of obj) { console.log(prop); }

External references