JSFiddle - React, Tailwind, and code Playground

by kalar su

JavaScript

//class name Shoe, capital "S" used for class
function Shoe(name, type , size){
   this.name = name; 
   this.type = type;
   this.size = size; 
}

Shoe.prototype = {
    putOn: function(){alert("put on!")},
    takeOff: function(){alert("take off")}
};

var newShoe = new Shoe("myshoe", "hill", "7");