There are some missing explanations and instructions in Basic JavaScript section(I mean they need more detail). We can check the conditions and accordingly define the code to be executed inside some other checked condition using nested if statements in javascript. JAVASCRIPT; C++; HTML; Breadcrumb. } { The for-in loop is an advanced loop used when dealing with objects, a concept you will learn more about as you continue the course. An Outerloop and Innerloop are the loops that can be any type of loop-like for loop, while loop or do-while loop. Need to loop the first array for find all the sub one, Loop inside the sub one for get all the values, Use *= for multiply product to the values of the sub arr. JavaScript objects are also arrays, which makes for a clean solution to index values by a key or name. while (i < 3) { { do For now, take a look at the sample code below to see if you understand what is happening. var i=0; Here we discuss an introduction to Nested Loop in JavaScript along with the flowchart, appropriate syntax and respective examples. Explanation to the above program: As in the above code the variable I initialize to 0. var sum=0; Once execution of the inner loop is done, the outer loop increment (i++), and after incrementing the I value the condition (i<2) evaluate again, if the condition is true, the program control goes to the inner loop and these steps repeat until the condition of the outer loop is true. Code language: CSS (css) How it works.