Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
exports.handler = (event, context, callback) => {
for (let i=0; i<30; i++){
console.log(fib(i))
}
const result = {
"isBase64Encoded": false,
"statusCode": 200,
"headers": {},
"body": "done"
}
callback(null, result);
};
function fib(n) {
if(n > 1){
return fib(n-1) + fib(n-2)
} else {
return n;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.