AMI Interview Question

How does foreach work in javascript?