To make a JavaScript class with a public method I’d do something like: function Restaurant() {} Restaurant.prototype.buy_food = function(){ // something here } Restaurant.prototype.use_restroom = function(){ // something here...
  • May 2, 2022
  • 0 Comments