JSFiddle - React, Tailwind, and code Playground

by painotpi

JavaScript

function employee(name, age, sex) {
    this.name = name;
    this.age = age;
    this.sex = sex;
}

var trialcoder = new employee('trialcoder', 26, 'M');
employee.prototype.salary = null;
trialcoder.salary = 19000;

alert("salary is "+ trialcoder.salary);