JSFiddle - React, Tailwind, and code Playground

JavaScript

(function () {
    var cached = false;
    if (window.hasOwnProperty) {
        cached = window.hasOwnProperty("location");
    }
    alert('Object.prototype.hasOwnProperty.call(window, "location"): ' + Object.prototype.hasOwnProperty.call(window, 'location') + '\n\nwindow.hasOwnProperty("location"): ' + cached);
})();