Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="container">
  <p>This returns a true of false value depending on whether the argument passed in is an array or not.</p>
  <p>Pass is one argument in any format and the method will tell you if it is an array.</p>
  <p>Thanks to MDN for the following examples</p>
  <p><code>Array.isArray([]);</code> returns <code id="output1"></code></p>
  <p><code>Array.isArray([1]);</code> returns <code id="output2"></code></p>
  <p><code>Array.isArray(new Array());</code> returns <code id="output3"></code></p>
    <p>Little known fact: Array.prototype itself is an array:</p>
  <p><code>Array.isArray(Array.prototype);</code> returns <code id="output4"></code></p>

  <p>All following calls return false</p>
  <p><code>Array.isArray();</code> returns <code id="output5"></code></p>
  <p><code>Array.isArray({});</code> returns <code id="output6"></code></p>
  <p><code>Array.isArray(null);</code> returns <code id="output7"></code></p>
  <p><code>Array.isArray(undefined);</code> returns <code id="output8"></code></p>
  <p><code>Array.isArray(17);</code> returns <code id="output9"></code></p>
  <p><code>Array.isArray('Array');</code> returns <code id="output10"></code></p>
  <p><code>Array.isArray(true);</code> returns <code id="output11"></code></p>
  <p><code>Array.isArray(false);</code> returns <code id="output12"></code></p>
  <p><code>Array.isArray({ __proto__: Array.prototype });</code> returns <code id="output13"></code></p>

  <h2>Try for yourself</h2>
  <p><code>Array.isArray(</code><input id="tryOutput" type="text"><code>);</code> returns <code></code></p>


                body { 
  font-family: sans-serif;
  background-color: rgb(29, 31, 32);
  color: #fff;
  font-size: 1.6em;
  margin-left: 24px;
p {
  margin-bottom: 12px;
  color: #fff;


$('#output3').html(Array.isArray(new Array()).toString());
// Little known fact: Array.prototype itself is an array:

// all following calls return false
$('#output13').html(Array.isArray({ __proto__: Array.prototype }).toString());