
While the first range will hold the list of multipliers corresponding to different rows, on the other hand, the second range will hold the result values. Further, we’ll need two ranges in our loop. File ( '/tmp' ).copyRecursively ( File ( '/home/hoge' ), true ) true: false: kotlin.io.FileAlreadyExistsException. Let’s advance our understanding of looping with multiple variables by applying concepts of ranges and the zip operator to generate multiplication tables, where each row shows up in the format: factor x multiplier = resultĪs the factor will remain the same in all the rows, we’ll have to loop through two multiplier and result variables.
