JSFiddle - React, Tailwind, and code Playground
JavaScript
function Dog() {
this.bark = function() {
alert('You dont need a prototype');
};
this.makeSound = function() {
this.bark();
};
};
new Dog().makeSound();
function Dog() {
this.bark = function() {
alert('You dont need a prototype');
};
this.makeSound = function() {
this.bark();
};
};
new Dog().makeSound();