项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Deze repo is gearchiveerd. U kunt bestanden bekijken en het klonen, maar niet pushen of problemen/pull-requests openen.
 
 
 
 

18 regels
467 B

  1. "use strict"
  2. module.exports = function(parentMedia, childMedia) {
  3. if (!parentMedia.length && childMedia.length) return childMedia
  4. if (parentMedia.length && !childMedia.length) return parentMedia
  5. if (!parentMedia.length && !childMedia.length) return []
  6. const media = []
  7. parentMedia.forEach(parentItem => {
  8. childMedia.forEach(childItem => {
  9. if (parentItem !== childItem) media.push(`${parentItem} and ${childItem}`)
  10. })
  11. })
  12. return media
  13. }