JSFiddle - React, Tailwind, and code Playground

by somya_kashyap3

JavaScript

/*function sayIt(){
    console.log("this is :" + this);   
    console.log(this);  
    this.name = "a";
    this.prin = function(){
    	console.log(this.name);
    }
    console.log(this);
}
sayIt();
var a = new sayIt();
a.prin();*/
var a = {name : "erik",
age : 30};
console.log(a.constructor == Object);

function b(name,age){
	this.name = name;
	this.age = age;
}
var c = new b("erik", 30);
console.log(c.age);
console.log(c.name);
console.log(b.constructor == Object)
c.gender = "male";
console.log(c.gender );
console.log(c);