This is my code:
String.prototype.count = function(character) {
    var seq = new RegExp('/'+character+'/g');
    var matches = this.toString().match(seq);
    return matches
};
'hello world'.count('o');
This is what it should do:
- Return array of os
This is what it's doing:
- Return null
 
     
    