Most objects have a certain collection of things that they can do. Different objects can do different things, just as a light can be turned on and off. Events are how we accept input from the user to trigger actions in our Javascript programs. The onClick event, as its name implies, will run the function when the user clicks on the button provided. Other events include OnMouseOver, OnMouseOut, OnFocus, OnBlur, OnLoad, and OnUnload.
Lets examine the for loop closely.
The third component of the for loop can be any integer increment, so counting by 3s, etc, is possible. Each item in an array is accessible by an index which is the position of the item from the start of the array. Searching One technique of great importance in computing is searching. A for loop then counts through each number in the array and compares each value in turn with the current value of biggest . At the end of the loop the program outputs the largest value found.