JSFiddle - React, Tailwind, and code Playground

by amatiasq

HTML

<script src="http://blog.amatiasq.com/fiddle-console.js"></script>

JavaScript

function Vector(x, y) {
  this.x = x;
  this.y = y;
}
Vector.prototype.toString = function() {
  return 'Vector [' + this.x + ',' + this.y + ']';
};

var v = new Vector(0, 0);
console.log(v);