{"id":10,"date":"2014-12-22T00:01:12","date_gmt":"2014-12-22T00:01:12","guid":{"rendered":"https:\/\/code.jamesash.com\/?p=10"},"modified":"2014-12-22T00:01:59","modified_gmt":"2014-12-22T00:01:59","slug":"fibonacci-sequence","status":"publish","type":"post","link":"https:\/\/code.jamesash.com\/?p=10","title":{"rendered":"Fibonacci Sequence"},"content":{"rendered":"<p>While I was doing quickie problems, I saw someone was asked to show a sample of the <a href=\"http:\/\/www.mathsisfun.com\/numbers\/fibonacci-sequence.html\" target=\"_blank\">Fibonacci Sequence<\/a>. \u00a0This one only took about 3 minutes. \u00a0Simple math.<\/p>\n<p>You can sum up the problem as a+b=c, b+c=d, c+d=e, etc for infinity. \u00a0For mine, I stopped at 2 million whatever.<\/p>\n<pre><code>\r\nvar x=0; y=1;\r\nwhile (x&lt;1000000) {\r\n  var z = x+y;\r\n  x = y; y = z;\r\n  document.write(z + \"&lt;br&gt;\");\r\n}\r\n<\/code><\/pre>\n<p>Like I said. \u00a0Simple math. \u00a0You can <a href=\"http:\/\/codepen.io\/anon\/pen\/xbOeoG\" target=\"_blank\">look at my CodePen<\/a> and adjust the while loop to make it go higher, if you like.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While I was doing quickie problems, I saw someone was asked to show a sample of the Fibonacci Sequence. \u00a0This one only took about 3 minutes. \u00a0Simple math. You can sum up the problem as a+b=c, b+c=d, c+d=e, etc for infinity. \u00a0For mine, I stopped at 2 million whatever. var x=0; y=1; while (x&lt;1000000) { &hellip; <a href=\"https:\/\/code.jamesash.com\/?p=10\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Fibonacci Sequence<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/code.jamesash.com\/index.php?rest_route=\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.jamesash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.jamesash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.jamesash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code.jamesash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10"}],"version-history":[{"count":2,"href":"https:\/\/code.jamesash.com\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":12,"href":"https:\/\/code.jamesash.com\/index.php?rest_route=\/wp\/v2\/posts\/10\/revisions\/12"}],"wp:attachment":[{"href":"https:\/\/code.jamesash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.jamesash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.jamesash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}