cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <div class="navbar-brand">Online Lodash Tester <small>by <a href="https://form.io" target="_blank"><img src='https://help.form.io/assets/formio-logo.png' style="height:1em" /></a></small>
      </div>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
    </div>
  </div>
</nav>
<div class="container" style="margin-top: 65px;margin-bottom: 150px;">
  <div class="jumbotron">
    <h1>Online Lodash Tester</h1>
    <div class="alert alert-success">Testing Lodash version <strong id="version"></strong></div>
    <p>This is an online tester for the <a href="https://lodash.com" target="_blank">Lodash Library</a>. Simply type your code in the box below and press <strong>Execute</strong>. It will run your code and then show the results in the <strong>Results</strong> section.</p>
    <p>Brought to you with <span class="glyphicon glyphicon-heart" aria-hidden="true"></span> by <a href="https://form.io" target="_blank"><img src='https://help.form.io/assets/formio-logo.png' style="height:1em" /></a>.
    <p>
    </p>
  </div>
  <div class="row">
    <div class="col col-sm-12">
      <h3>Lodash Code</h3>
      <p>Enter your code below. Set the value of <code>result</code> to what you would like to show in the results section.</p>
    </div>
  </div>
  <div class="row">
    <div class="col col-sm-7">
      <div><strong>Example:</strong><pre>
var users = [
  { user: 'barney', age: 36, active: true },
  { user: 'fred',  age: 40, active: false },
  { user: 'travis', age: 37, active: true}
];

result = _.filter(users, function(o) { return o.active; });
      </pre></div>
      <textarea id="code" class="form-control" rows="10" placeholder="Enter your lodash code here."></textarea><br/>
      <a class="btn btn-primary" id="execute">Execute</a>
    </div>
    <div class="col col-sm-5">
      <strong style="margin-top:0;">Result:</strong>
      <pre class="pre-scrollable" style="min-height: 390px;"  id="result"></pre>
    </div>
  </div>
</div> <!-- /container -->
<div class="well" style="text-align:center;margin-bottom:0;border-radius:0;">
  <p>Brought to you by <a href="https://form.io">Form.io</a>
</div>
            
          
!
            
              $('#version').text(_.VERSION);
window._ = _;
$(function() {
  $('#execute').click(function() {
    var code = $('#code').val();
    var result = null;
    try {
      result = eval(code);
    }
    catch (err) {
      result = err.message;
    }
    if (!result) {
      result = 'No result';
    }
    if (typeof result === 'object') {
      try {
        result = JSON.stringify(result, null, '   '); 
      }
      catch (err) {
        result = err.message;
      }
    }
    $('#result').text(result);
  });
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console