|This loop is used with arrays and objects , to access their elements and properties respectively.
In for..in looping the variable starts from zero and increases itself with one until it reach to the length of array.
|for( variablename in objectname)
lines to be executed
var shop=new Array()
for(color in shop)
|Color is a undefined variable and shop is an array, when color is kept as a subscript of array shop then the color variable becomes of number type and from 0 to 4 gets incremented by for – in loop. It is increased up to 4 only because shop array have 5 elements and an array start from 0 position.|
A function which calls itself, is called a recursive function. When A function calls itself …