Looking at the source code, they just create a function containing the code in the textarea, using the Function
constructor which takes the function body as a method. Then they call the function:
try {
(new Function( jQuery("#code").val() ))();
} catch(e){
error(e.message);
}
This works in a very similar way to eval
with the exception that the new function cannot access variables in the current scope, as the Note in the link states:
Note: Functions created with the Function constructor do not create closures to their creation contexts; they always are created in the global scope. When running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the Function constructor was called. This is different from using eval with code for a function expression.