Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Favourite programming blags?

Name: Anonymous 2009-02-07 16:38

Justin Etheridge @ http://www.codethinked.com/
I actually knew this guy back in high school

Also http://www.geekdaily.net/ occasionally has some good stuff

Name: Anonymous 2009-02-08 14:36

>>8
2009-01-16

Hyper Operator in JavaScript

//calculate numbers with hyper operators(1-4)
// above 4 is useless for floating-point numbers.
function hyp(x,y,h) {
   switch(h) {
      case 1:;
return x+y;break;
      case 2:;
return x*y;break;
      case 3:;
return Math.pow(x,y);break;
      case 4:;var p=x;for(var i=1;i<y;i++){x=Math.pow(p,x)}
return x;break;
   }
}

Posted by FrozenVoid at 13:56 0 comments Links to this post
Labels: javascript

why do you need to break after you've already returned from a function?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List