I thought age 40 and over was the protected class WRT age.
State laws may vary, check your local jurisdiction to see if they add more.
The Age Discrimination in Employment Act (ADEA) only forbids age discrimination against people who are age 40 or older. It does not protect workers under the age of 40, although some states do have laws that protect younger workers from age discrimination.
If your state or local jurisdiction doesn't protect young(er) workers against discrimination and only the federal law applies, then an employer can discriminate against the young but not the old.