Skip to content

Instantly share code, notes, and snippets.

View cironunes's full-sized avatar
🎯
Focusing

Ciro Nunes cironunes

🎯
Focusing
View GitHub Profile
@cironunes
cironunes / fibonacci.js
Created September 7, 2011 12:21
Fibonacci number script
var Fibonacci = function () {
//private
var nums = [0,1];
return {
pushNumbers: function (q) {
//check if value pass to this method is a number
//if not set it to 0
q = typeof q === 'number' ? q : 0;