JSFiddle - React, Tailwind, and code Playground
JavaScript
function a() {
return typeof this;
}
function b() {
"use strict";
return typeof this;
}
function c() {
return Object.prototype.toString.call(this);
}
function t(x) {
console.log(a.call(x), b.call(x), c.call(x));
}
function Foo() {
}
Foo.prototype = [];
t('foo');
t(100);
t(function(){});
t(new Date());
t(window);
t(/foo/);
t({});
t([]);
t(undefined);
t(null);
t(true);
t(new Error());
t(new Foo());
t(Math);