Skip to content

Instantly share code, notes, and snippets.

@pazguille
Last active August 29, 2015 14:04
Show Gist options
  • Save pazguille/b6fac06b0c18317a7655 to your computer and use it in GitHub Desktop.
Save pazguille/b6fac06b0c18317a7655 to your computer and use it in GitHub Desktop.

NodeList vs Array

A NodeList is a reference to a collection of objects, and if that collection changes (for example, elements are added or removed) the NodeList will automatically update to reflect that change; conversely our array is a static snapshot of the collection at one point in time, and so won’t update in response to changes in the DOM. Depending on your application, that could be significant.

Source: Sitepoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment