Number of distinct subsets of a set | Returns 2 ^ n ; Driver code
function subsetCount ( arr , n ) { return 1 << n ; } let A = [ 1 , 2 , 3 ] ; let n = A . length ; document . write ( subsetCount ( A , n ) ) ;