Is there a better way? I have added the following to the String.protoype:
// str.whereIn(['cat', 'dog, 'mouse']);
String.prototype.whereIn = function(stringArray){
var a = stringArray.indexOf(this.valueOf());
return a>-1;
};
Is there a better way? I have added the following to the String.protoype:
// str.whereIn(['cat', 'dog, 'mouse']);
String.prototype.whereIn = function(stringArray){
var a = stringArray.indexOf(this.valueOf());
return a>-1;
};