JSFiddle - React, Tailwind, and code Playground

JavaScript

function Stack() {
    this.stac = new Array();
    this.pop = function () {
        return this.stac.pop();
    }
    this.push = function (item) {
        this.stac.push(item);
    }
}

Stack.prototype.notAnOwnProperty = 12;

var stack = new Stack();

alert(stack.hasOwnProperty('pop'));
alert(stack.hasOwnProperty('notAnOwnProperty'));