Please enable JavaScript to use CodeHS

CodeHS Glossary


Counter JavaScript

A variable used to count the number of times an action has been performed. For example, to count how many times a loop has executed, we can use a counter variable like `i`: for(var i = 0; i < 10; i++) {