For the purposes of this chapter, a “juvenile” is a person who has not attained his eighteenth birthday, or for the purpose of proceedings and disposition under this chapter for an alleged act of juvenile delinquency, a person who has not attained his twenty-first birthday, and “juvenile delinquency” is the violation of a law of the United States committed by a person prior to his eighteenth birthday which would have been a crime if committed by an adult or a violation by such a person of section
922
(x).