code: function(p) {
  
              if (!p) return false;
  
              var points = this.points;
              var otherPoints = p.points;
  
              var numPoints = points.length;
              if (otherPoints.length !== numPoints) return false; // if the two polylines have different number of points, they cannot be equal
  
              for (var i = 0; i < numPoints; i++) {
  
                  var point = points[i];
                  var otherPoint = p.points[i];
  
                  // as soon as an inequality is found in points, return false
                  if (!point.equals(otherPoint)) return false;
              }
  
              // if no inequality found in points, return true
              return true;
          }
docs: Checks whether two polylines are exactly the same. If `p` is undefined or null, returns false.