Skip to content

Instantly share code, notes, and snippets.

@shanelonergan
Created January 25, 2020 20:06
Show Gist options
  • Save shanelonergan/d785e54687eb04bc74e63b6bfa90e65a to your computer and use it in GitHub Desktop.
Save shanelonergan/d785e54687eb04bc74e63b6bfa90e65a to your computer and use it in GitHub Desktop.
function getElementsByClassName2(classNameStr) {
const elements = [] // the array we will add matching elements to
const firstChildren = this.children // all the children of the element the function is called on
return elements
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment