Type ECMAScript code and place the cursor in an identifier. Note: Scope is not handled properly yet, see issue 98.
// Array shuffling code from Underscore.js. _.shuffle = function(obj) { var shuffled = [], rand; each(obj, function(value, index, list) { rand = Math.floor(Math.random() * (index + 1)); shuffled[index] = shuffled[rand]; shuffled[rand] = value; }); return shuffled; };
The above code editor is based on CodeMirror.
Using Esprima version .