Block-based programming languages are becoming a favourite learning tool for programming novices while the traditional way of teaching programming mostly uses text-based programming languages. The purpose of this study was to compare the impact of used visual and textual programming languages on K-12 students' understanding of the loop concept. Participants were 312 elementary school students from 5th to 8th grade using visual programming language Scratch (n = 59), and textual programming languages Logo (n = 185) and Python (n = 68). Tests for all languages were equivalent, differing only in the used programming language. Results showed that students achieved statistically significant higher scores when using block-based programming language compared to students using textual programming languages. These results show that K-12 students need concrete experience to understand abstract concepts, as the loop concept, which Scratch as a block-based programming language provides.