Any person who is under 18 years of age when he violates any law or ordinance defining a crime, other than a curfew ordinance, is within the jurisdiction of the juvenile court which may adjudge such person to be a ward of the court.