Generate all partitions of a set of items
I see the performance tag added to this post. Did you intent to have answers address performance in terms of time, space or other aspects?
If you are looking to optimize performance in terms of time then I must restrain myself from suggesting changing the outer for loop to a for of loop. However I do see there is a forEach loop inside the nested for loop. If you really want to optimize for performance, then consider using a for loop instead of that .forEach method. Also consider whether the same result can be achieved by iterating backwards through the loops - this would allow for fewer operations1.
Given that an arrow function is used in the .forEach() callback, other ecmascript-6 features can be used - e.g. const and let instead of var, spread syntax instead of calling .concat(), etc.