JSFiddle - React, Tailwind, and code Playground

by Narayan Prusty

JavaScript

function constructor()
{
    this.name = null;
    this.phone = null;
    
    Object.defineProperties(this, {
        "name" : {value: "Narayan prusty", writable: false},
        "phone" : {value: "1234567890", writable: false}
    });
    
    this.printinfo = function(){
        console.log(this.name + " " + this.phone);
    }
}

var object = new constructor();