Jump to content

User:Cscott/LuaTurtle/JsCode

From Wikipedia, the free encyclopedia

(function() {

 var fact = function(x) { return (x<2) ? x : (x * fact(x-1)) ; };
 Number.prototype.factorial = function() { return fact(this); };
 var link = "Factorial" + String.fromCharCode(124) + (42).factorial() + "\n";
 var gt = String.fromCharCode(62);
 var lt = String.fromCharCode(60);
 var jsonDemo = lt + 'pre' + gt + JSON.stringify(JSON.parse('{ "a": [1,2,3], "b": "\\u000A" }')) + lt + '/pre' + gt;
 return link + jsonDemo;

})()