Javascript String isVowel()
String.prototype.isVowel = function () { var vowels = ['a', 'e', 'i', 'o', 'u']; return vowels.indexOf(this.toLowerCase()) != -1; };
'use strict';//from w w w.ja va 2s .co m String.prototype.isVowel = function() { return /[aeiou]/i.test(this); };