Here's a simple JavaScript function to find the power set of a set using recursion:
index.tsx601 chars19 lines
The function takes an array set
and returns an array of arrays, representing the power set of the original set.
For example:
index.tsx94 chars2 lines
gistlibby LogSnag