for … in

for … in

Description

for (mixed variable in object object)

Parameters

Name Description Type Default Optional
variable mixed No
object object No

Examples

Example #1 – for … in example

Iteration between two values.

var obj = {foo: 'Foo', bar: 'Bar'}; for (var prop in obj) { console.log(prop, obj[prop]); }

External references