Javascript How Do Arrange Arrays With Different Combinations Stack

Javascript How Do Arrange Arrays With Different Combinations Stack