= buildFoundation(size); let walls = buildWalls(bedrooms); let paintedWalls = paintWalls(color, walls); let roof = buildRoof(foundation, walls); let house = foundation + paintedWalls + roof; // house is all done right-away return house; }
} export function buildHouse(lot, color, size, bedrooms, callback) { getPermits((permits) => { clearLot(permits, lot); let foundation = buildFoundation(size); let walls = buildWalls(bedrooms); let paintedWalls = paintWalls(color, walls); let roof = buildRoof(foundation, walls); let house = foundation + paintedWalls + roof; // house will be ready in about a year callback(house); }); }
=> param.name); // is there a callback param? var hasCallback = params[params.length - 1] === 'callback'; // is there a return in the immediate body? var hasReturn = node.body.some((node) => node.type === 'ReturnStatement'); // callback or return or '' return hasCallback ? 'callback' : (hasReturn ? 'return' : ''); }
"was added" } if (!func.after) { return "was removed" } if (func.before.outputType !== func.after.outputType) { return "output went from a " + func.before.outputType + " to a " + func.after.outputType; } }