Solution for Data Structures: Create a Map Data Structure

What is your hint or solution suggestion?
This works but it doesn’t pass the freeCodeCamp validations,
suggestions?

var Map = function() {
  this.collection = {};
  // change code below this line
  this.add = function(key,value){
    this.collection[key] = value;
  }

  this.remove = function(key){
    this.collection.remove(key);
  }

  this.get = function(key){
    return this.collection[key];
  }

  this.has = function(key){
    return key in this.collection;
  }

  this.values = function(key){
    let objKeys = Object.keys(this.collection)
    return objKeys.map(key => this.collection[key])
  }

  this.size = function(){
    return Object.keys(this.collection).length
  }

  this.clear = function(){
    this.collection = {}
  }
  // change code above this line
};

Challenge: Create a Map Data Structure

Link to the challenge:

Your Map function’s remove method does not work. Fix that and you will have a full functional Map function that passes all the tests.

Edit: There is not currently a test to validate the remove method added by the user actually works. If there would have been such a test, then you would have failed both. The reason the last test fails, is because the test behind the scenes attempts to call your remove method. Since your when your remove method is called by the test, it errors out as a type error (TypeError: this.collection.remove is not a function) and the test fails.

OH yeah,
my bad!
thank you.