// from solutionslet result;varsubsets=function (nums) { result = []; // no need this if function is executed oncerecursive(0, nums, []);return result;};varrecursive=function (start, nums, subset) {// console.log(subset)result.push(subset.slice(0));for (let i = start; i <nums.length; i++) {subset.push(nums[i]);// console.log(subset)recursive(i +1, nums, subset);subset.pop();// console.log(subset) }};