JSFiddle - React, Tailwind, and code Playground
by guyluchenbill
HTML
<div id="output"></div>
JavaScript
var Table = function() {};
Table.prototype.createTable = function() {
var o = document.getElementById('output');
o.innerHTML = 'Table Created';
};
Table.prototype.createSeats = function() {
console.log(Player.prototype.getPlayers());
};
var Player = function() {};
Player.prototype.setPlayers = function(players) {
this.players = players;
return this.players;
};
Player.prototype.getPlayers = function() {
return this.players;
};
var table = new Table();
table.createTable();
var players = new Player();
players.setPlayers(5);
console.log(players.getPlayers());
console.log(table.getPlayers());