Solution doesn't seem to work for an edge case

var abcd = 2a example is supposed to return false, however the solution
considers this as true because the 2 is matched as a digit and doesn’t consider the a at the end which breaks one of the conditions in the question.