JSFiddle - React, Tailwind, and code Playground

by Joshua Koudys

JavaScript

var foo = [1,2,3],
    bar = {0: 'a', 1: 'b', 2: 'c'};

document.body.textContent += 'Variable foo is ' + (foo.constructor === Array ? '' : 'not') + ' an Array, ' +
    'and is ' + (foo.constructor === Object ? '' : 'not') + ' a POJO. ' +
    'Variable bar is ' + (bar.constructor === Array ? '' : 'not') + ' an Array, ' +
    'and is ' + (bar.constructor === Object ? '' : 'not') + ' a POJO.';