Skip to content

Instantly share code, notes, and snippets.

@emkay
Created November 14, 2011 04:02
Show Gist options
  • Select an option

  • Save emkay/1363201 to your computer and use it in GitHub Desktop.

Select an option

Save emkay/1363201 to your computer and use it in GitHub Desktop.
Array Examples
var people = ['Bob', 'Sally', 'Sara', 'Frank'];
console.log(people.length); // 4
var i;
var len = people.length;
for (i = 0; i < len; i += 1) {
console.log(people[i]);
}
/* outputs
Bob
Sally
Sara
Frank
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment