JSFiddle - React, Tailwind, and code Playground

by darren_n

HTML

<script src="https://raw.github.com/documentcloud/underscore/master/underscore-min.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.array.builders.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.array.selectors.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.function.arity.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.function.combinators.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.function.predicates.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.object.builders.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.object.selectors.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.util.existential.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.util.strings.js"></script>
<script src="https://raw.github.com/documentcloud/underscore-contrib/master/underscore.util.trampolines.js"></script>
<h2>Output:</h2><pre></pre>

JavaScript

// Logger Function - Nothing to see here!
var $output = $('pre');
var log = function (c) {
    text = [];
    _.each(_.toArray(arguments), function (a) {
        if (_.isObject(a)) {
            a = JSON.stringify(a);
        }
        text.push(a);
    });
    $output.append('\n\n' + text.join('\n'));
}

// How to use log ->
log('Hello!', ['hello',1,2,3])

// Put your functions down here:

var identity = function(x) { return x; }

log(identity(3));