Juvenile court properly considered the seriousness of J.W.’s prior offenses in denying his request to seal his juvenile records (Welf. & Inst. Code, § 781, subd. (a)). J.W.’s juvenile records consisted of 14 incidents, including three counts of attempted robbery and battery causing serious bodily injury. After turning 18, J.W. petitioned the court to seal his juvenile records pursuant to section 781, subdivision (a). He presented evidence that he had improved his behavior, had finished high school, was taking community college classes, and wanted to join the Air Force. The juvenile court declined to seal J.W.’s records, finding that his robbery and battery offenses were serious and that insufficient time had elapsed since he committed the offenses to demonstrate he was rehabilitated. J.W. appealed, arguing that the juvenile court erred by taking the seriousness of his prior offenses into account. Held: Affirmed. Section 781 gives a juvenile court discretion to seal a juvenile’s delinquency records if it determines that the juvenile is rehabilitated. However, the records of a juvenile who has committed one of the offenses listed in Welfare and Institutions Code section 707 may not be sealed. The fact that the statute provides that some offenses are so serious that juvenile records must remain open as a matter of law suggests that the juvenile court should consider the seriousness of the offenses. This conclusion is supported by other statutory schemes where a finding of rehabilitation depends to some degree on the seriousness of the prior offenses. (See Pen. Code, §§ 3041, subd. (b) [adult parole], 4852.03 [adult offender certificates of rehabilitation]). The court also rejected J.W.’s additional arguments that the term “rehabilitation” is so vague that it denied him due process and that the trial court abused its discretion in concluding that he was not rehabilitated.