Directly on the code, the original code, switch in the first case, after judgment, less add a break out of judgment statement, harm I checked for a long while, "how the style is always wrong, not science Ah, oh, the original is not out of case judgment, will also carry out the judgment behind!" , hey, hey, but later still found, open heart ... ”
Original address: http://www.cnblogs.com/wybztn/archive/2009/11/18/1605285.html
Here is an important design technique, 0001, 0010, 0100, 1000 each represents a situation, the combination of a number of situations, how do we say, or how to store this n multiple combinations of the case, the use of a technique, 1. First bitwise or stored in a variable a, 2. A & 1, and no sign right shift >>> until 0 (stop).
Directly on the code
JavaScript bitwise OR (|), unsigned Right shift (>>>) operations, combination techniques to achieve ———— password strength hints, four cases??