I'm new to jQuery and am currently working on modifying Firas Kassem's password strength meter and wanted to check against an array of disallowed words. I came across this question for a starting point. What I have currently is:
var badArr = ['password','system','user','demo','test','default'] //Array of unusable words
//check if bad words are in password
$.each(badArr, function(index,value)
{
if(password.match(value))
return badPass
})
The problem is that it doesn't return the badPass. Any insight on what I'm doing wrong?