code: function flattenElementsAr (ar) {
    return ar.reduce((acc, el) => {
      return isArray(el) ? [ ...acc, ...el ] : [ ...acc, el ]
    }, []).filter(notNull) // null means ignore
  }
docs: flatten the elements array