Skip to content

Instantly share code, notes, and snippets.

View nataliemok's full-sized avatar

Natalie Mok nataliemok

  • Vancouver, BC
View GitHub Profile
@nataliemok
nataliemok / fib.js
Created October 20, 2016 18:17
Fibonacci Sequence, takes 1 CLI input
function fib_sequence(n) {
let arr = [1,1];
if (n <= 0) {
return ('Enter a value that is larger than 0.\nTry again...');
}
if (n === 1) {
return ('The first value of the Fibonacci sequence is 1.');
}