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

JavaScript BBCode One-liners

Name: Anonymous 2010-05-03 23:16

(function(s) { var t = "[spoiler]", ct = "[/spoiler]", e = s.length-1; return s.length == 2 || s.length == 1 ? t + s + ct : t + s[0] + arguments.callee(s.substring(1,e)) + s[e] + ct; })();

Name: Anonymous 2010-05-04 0:23

>>1
usually "one-liner" means one statement. your function contains two, which makes it a two-liner.

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