D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
aciurea
Full window
Github gist
JS Bin // source http://jsbin.com/ruxuhil
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <script id="jsbin-javascript"> const fibonnaci = { [Symbol.iterator](){ let num1 = 1, num2 = 1; return { [Symbol.iterator](){return this;}, next(){ let current = num2; num2 = num1; num1 += current; return {value: num1, done: false}; }, return(v){ console.log('finished---'); return{value:v, done:true};} } } } console.log(1); for(var a of fibonnaci){ console.log(a); if(a>50)break; } </script> <script id="jsbin-source-javascript" type="text/javascript">const fibonnaci = { [Symbol.iterator](){ let num1 = 1, num2 = 1; return { [Symbol.iterator](){return this;}, next(){ let current = num2; num2 = num1; num1 += current; return {value: num1, done: false}; }, return(v){ console.log('finished---'); return{value:v, done:true};} } } } console.log(1); for(var a of fibonnaci){ console.log(a); if(a>50)break; }</script></body> </html>