JSFiddle - React, Tailwind, and code Playground

by Fu-Ching Hsiao

JavaScript

let resp = '123';
class a{
	constructor(a,b){
		this.a = a;
		this.b = b;
	}
	p(){
		console.log(this.a);
	}
	p2(){
		this.b();
	}
	p3(resp){
		this.b(resp);
	}
}

let temp = function(resp){
	console.log(resp);
}

let c = new a(1,temp);
c.p();
c.p2();
c.p3(resp);