JSFiddle - React, Tailwind, and code Playground

by David Kyle

JavaScript

'use strict';

var myInstance = {
	id: 0,
  text: 'hello'
};

console.log(myInstance);

class aClass {
	constructor(id, text) {
  	this.id = id;
    this.text = text;
  }
}

let instance = new aClass(0, 'hello');

console.log(instance);

if (instance instanceof aClass) {
	alert('yep');
}