JSFiddle - React, Tailwind, and code Playground

by sandfresh

JavaScript

function Foo(){
		this.x = 0;
    this.x1 = 10;
    
   this.funcA =  function (){
    		console.log(this.x);
        console.log(this.x1);
    }
}

Foo.prototype.x = 20;
let a = new Foo();
a. funcA();