JSFiddle - React, Tailwind, and code Playground

by rishul matta

JavaScript

function a(b){
 alert(a.length);
    alert(arguments.length);
    
}
//a(1,2,3);

//below we have 3 constructors notice Capital casing of the names
function GrandDad(family){
    this.family=family;
    this.toString=function(){
        return "i am grand dad const";
    };
}

function Dad(middle){
    this.middle=middle;
}

function Child(name){
    this.name=name;
}

//start inheritance

Dad.prototype= new GrandDad();
Child.proptotype= new Dad();

var o = new Child("dude");
o.toString();