Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

Tag Archive for ‘Break’

JavaScript 008 – Loops For, While, For…In

JavaScript While Loop Example

All the programming languages supports Loops. Loops run the block of code repeatedly to achieve some goal. For example, let us say you have 1000 students’ height in an array, and you want to calculate average student height. Here, a loop is required to read each student’s height and perform a running count. At the end of the loop, we can calculate the average as we have total height and total number of students. In these JavaScript examples, we will learn the looping techniques.

Continue Reading →