hasBad: "bad" at index 0 or 1?
Given a string, return true if "bad" appears starting at index 0 or 1, such as in "badxxx" or "xbadxx" but not "xxbadxx". The string may be any length, including 0. Step through hasBad: each test checks the length first, so && skips any substring that would run past the end.