[PHP] pobierz, plaintext var game = function() { this.start = function () { console.log ('Game started'); }; }; // próbowałem game.start();this.start(); [PHP] pobierz, plaintext
[JAVASCRIPT] pobierz, plaintext var game = { start: function() { console.log('game.start'); }}; game.start(); var Game = function() { this.start = function() { console.log('Game.start'); }} var g = new Game();g.start();[JAVASCRIPT] pobierz, plaintext
[HTML] pobierz, plaintext class game { start() { console.log ('Game started'); }} let game1 = new game();game1.start();[HTML] pobierz, plaintext