JSFiddle - React, Tailwind, and code Playground

by Zaheer Ahmed

JavaScript

var employee={
firstname : "firstName",
lastname  : "LastName",
id        :  1
};

alert(typeof employee);

var array=new Array("item1","item2","item3");
// One of the weird behaviour and spec in Javascript is the typeof Array is Object.
alert(typeof array);

// most reliable way to confirm
alert(Object.prototype.toString.call(array));

var myFunc =  function(){};
alert(typeof myFunc);