How to use an array with the selector "contains"?

How to use an array with the selector "contains"?

I want to use an array with the selector contains, for example i have this jquery:
  1. $(".element:contains('word1'),.element:contains('word2'),.element:contains('word3')").each(function(){
  2. $(this).css("display","none");
  3. });
And i want to simplify using an array:
  1. var x = ["word1","word2","word3"];
  2. $(".element:contains(x)").each(function(){
  3. $(this).css("display","none");
  4. });
How can I do something like that?

Thanks in advance. :)