JSFiddle - React, Tailwind, and code Playground

by kasperfish

JavaScript

var MyClass={
		test:'hello',

		hallo: function(){
			alert(this.test);
		},

		setTest: function(x){
			this.test=x;
		}

	}

MyClass.hallo();
MyClass.setTest('world');
MyClass.hallo();

//not working because MyClass is/does not have  not a constructor
x= new MyClass;
x.hallo();