Computer science (CS) activities for young students are widely used, particularly visual programming environments. We investigated the use of the Scratch environment for teaching CS concepts to middle school students. In a previous article [Meerbaum-Salant et al. 2013], we reported on the extent to which the CS concepts were successfully learned. In this article, we look at the transition from studying CS with the visual Scratch environment in middle school to studying CS with a professional textual programming language (C# or Java) in secondary school. We found that the programming knowledge and experience of students who had learned Scratch greatly facilitated learning the more advanced material in secondary school: less time was needed to learn new topics, there were fewer learning difficulties, and they achieved higher cognitive levels of understanding of most concepts (although at the end of the teaching process, there were no significant differences in achievements compared to students who had not studied Scratch). Furthermore, there was increased enrollment in CS classes, and students were observed to display higher levels of motivation and self-efficacy. This research justifies teaching CS in general and visual programming in particular in middle schools.