JSFiddle - React, Tailwind, and code Playground
by tuanderful
JavaScript
var Foo = function (string){
this.status = string;
};
Foo.prototype.getStatus = function (){
return this.status;
};
var myFoo = new Foo("foe");
function Bar (string){
this.status = string;
};
Bar.prototype.getStatus = function (){
return this.status;
};
var myBar = new Bar("bum");
//var gee = new Object();
//gee.__proto__ = new Foo("stat");
console.log( new Foo("asdf") );
console.log(myFoo
//console.log(myFoo);
//console.log(gee);
document.write( myFoo.getStatus() );
document.write( myBar.getStatus() );