array = array.filter(function(string) { return ~string.indexOf("undefined"); });
array = array.filter((string) => string.contains("undefined"));