Skip to content
Advertisement

Loop multiple lists based on their length [closed]

In my code I have 6 lists of objects of different sizes.

I need to go through them all in a specific order, from the smallest list to the largest.

JavaScript

Does anyone have a simple solution ? Thanks

Advertisement

Answer

You could add the lists in an array, sort it and perform the loop

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement