script.js
//The following function generates a true/false return by comparing two arrays.  I found it on Stack Overflow.  The testArray includes all values common to both input arrays.  I didn't need that resulting array - just true/false return - so I added the var assignment and the if statement.
The following function generates a true/false return by comparing two arrays.  I found it on Stack Overflow.  The testArray includes all values common to both input arrays.  I didn't need that resulting array - just true/false return - so I added the var assignment and the if statement.
The following function generates a true / false return by comparing two arrays . I found it on Stack Overflow . The testArray includes all values common to both input arrays . I didn ' t need that resulting array - just true / false return - so I added the var assignment and the if statement .
function checkPassword(array1, array2) {  
  var testArray = array1.filter(function(n) {
      return array2.indexOf(n) !== -1;
      })
  if (testArray.length > 0) {
    return true;
  }
}
function checkPassword ( array1 , array2 ) { var testArray = array1 . filter ( function ( n ) { return array2 . indexOf ( n ) !== - 1 ; } ) if ( testArray . length > 0 ) { return true ; } }
The following function generates a true/false return by comparing two arrays.
The following function generates a true / false return by comparing two arrays .