JSFiddle - React, Tailwind, and code Playground

by Zevan

JavaScript

function method(name, func){
    
}
function Test(){
    this.value = 10;
    var scope = 1;
    this.init = function(a){
         
    }
    
    this.hello = function(){
      alert(this.value);   
    }
}
Test.prototype.static = "zevan";
 
var t = new Test();
//t.hello();
//alert(Test.static);

function Sub(){
     
    this.hello();
}

Sub.prototype = new Test();
Sub.prototype.constructor = Sub;

var s = new Sub();
//s.hello();
//alert(Sub.prototype.static);