JSFiddle - React, Tailwind, and code Playground

by hong owen

JavaScript

var Cat = function(){
    this.Color = "black";
    this.Eat = function(){
    	alert("吃老鼠");
    };
}
Cat.prototype.A = function(){
	alert("Cat A");
};
Cat.prototype.B =  function(){
	alert("Cat B");
}

var cat1 = new Cat();
var cat2 = new Cat();

alert(cat1.Eat == cat2.Eat) // false
alert(cat1.A == cat2.A) // true