code: function similar(a,b) {
      if(a instanceof Array) {
          if(!(b instanceof Array))
              return false
  
          var tenPercent = a.length/10
          var notEqual = Math.abs(a.length-b.length) // initialize with the length difference
          for(var n=0; n<a.length; n++) {
              if(equal(a[n],b[n])) {
                  if(notEqual >= 2 && notEqual > tenPercent || notEqual === a.length) {
                      return false
                  }
  
                  notEqual++
              }
          }
          // else
          return true
  
      } else if(a instanceof Object) {
          if(!(b instanceof Object))
              return false
  
          var keyMap = merge(arrayToMap(Object.keys(a)), arrayToMap(Object.keys(b)))
          var keyLength = Object.keys(keyMap).length
          var tenPercent = keyLength / 10
          var notEqual = 0
          for(var key in keyMap) {
              var aVal = a[key]
              var bVal = b[key]
  
              if(!equal(aVal,bVal)) {
                  if(notEqual >= 2 && notEqual > tenPercent || notEqual+1 === keyLength) {
                      return false
                  }
  
                  notEqual++
              }
          }
          // else
          return true
  
      } else {
          return a===b || Number.isNaN(a) && Number.isNaN(b)
      }
  }
docs: compares arrays and objects and returns true if they're similar meaning: less than 2 changes, or less than 10% different members