JEDI - Javascript Embedded Data Islands
mylittlehacks.appspot.com3 pointsby TweedHeads1 comments
- canvas
- svg
- css3
- web fonts
- web sockets
- local storage
- geolocation
HTML5 tags? It could've been better with custom tags. <div id="phone">555-1234</div>
use: <#phone>555-1234</#phone>
or <.phone>555-1234</.phone>
<.phone>555-5678</.phone>
That way we can be future-proof. builder = function(x){ return function(n){ return x(x)(n); }}
factorial = function(f){ return function(n){ return n==0?1:n*f(f)(n-1);} }
alert(builder(factorial)(8))
One liner, just seed factorial to builder: r = (function(x){ return function(n){ return x(x)(n); } } (function(f){ return function(n){ return n==0?1:n*f(f)(n-1);} }))(8); function fac(x){ return x==0?1:x*fac(x-1); }
a = fac(8);
or a one-liner:
a = (function fac(x){ return x==0?1:x*fac(x-1); })(8);
Both ways spit 4320
and from there all the functions you may need to do whatever you want.
Beautiful? hell no.
Simple? enough to have millions of wannabe coders doing wonders on the web with just a $5 hammer and a box of nails.