This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
NewerOlder