JSFiddle - React, Tailwind, and code Playground

by Nikola Mihin

JavaScript

function person(name,age,weight){
    this.name = name;
    this.age = age;
    this.weight = weight;
}

person.prototype.nationality = "English";
person.prototype.concatenation = function(){
    return this.name + " " + this.weight;
}

var Mother = new person("Marija","64","80kg");
var Father = new person("Đuro","62","84kg");
Father.stats = function(){
    return this.name + " " + this.age + " " + this.weight;
};

//alert(Father.stats());
//alert(Father.nationality);
alert(Mother.concatenation());