This blows my mind.
var rexPassword = /[A-Z]/g;
console.log(rexPassword.test('Password1!'));
console.log(rexPassword.test('Password1!'));
console.log(rexPassword.test('Password1!'));
This is the same exact regular expression testing against the same exact string constant, but the output alternates as follows:
true
false
true
What is going on here?!