Skip to content

Instantly share code, notes, and snippets.

@fcarelse
fcarelse / npxtest
Last active August 6, 2020 01:49
Testing NPX
console.log('Hello, World!');
process.exit();
//Bye
// Standard fibonacci puzzle
function fib(n){
for(var i=0,j=1,k=0;n--;i=i+j,j=k,k=i);// Semicolon required here
// Only return i after n has counted down
return i;
}
// 1,1,2,3,5,8,13,21,34,55
// Standard fizzbuzz puzzle
// Standard fibonacci puzzle
function fib(n){
for(var i=0,j=1,k=0;n--;i=i+j,j=k,k=i);// Semicolon required here
// Only return i after n has counted down
return i;
}
// 1,1,2,3,5,8,13,21,34,55
// Standard fizzbuzz puzzle