(a,b,c=_=>(a.find(p=>b=p.path.exec(location.hash))?.render(b),c))=>onhashchange=c()
Shortened with inspiration from @Posandu
const route = (a,b,c=_=>(a.find(p=>b=p.path.exec(location.hash))?.render(b),c))=>onhashchange=c();
(a,b,c=_=>(a.find(p=>b=p.path.exec(location.hash))?.render(b),c))=>onhashchange=c()
Shortened with inspiration from @Posandu
const route = (a,b,c=_=>(a.find(p=>b=p.path.exec(location.hash))?.render(b),c))=>onhashchange=c();
Learning without thought is labor lost; thought without learning is perilous.
— Confucius
Programmer ninjas of the past used these tricks to sharpen the mind of code maintainers.
Code review gurus look for them in test tasks.
Novice developers sometimes use them even better than programmer ninjas.
Read them carefully and find out who you are – a ninja, a novice, or maybe a code reviewer?
By Mark Damon Hughes [email protected]
The original Rogue algorithm is pretty nifty. Any time you need a random dungeon, give this a try: