getElement Function

PHOTO EMBED

Fri Dec 30 2022 04:32:23 GMT+0000 (Coordinated Universal Time)

Saved by @davidmchale #getelement #helper

const getElement = (element) => {
  if(element){
    const myElement = document.querySelector(element)
    return myElement
  }else{
    console.log('no element found')
  }
}
content_copyCOPY

target an element check function