JSFiddle - React, Tailwind, and code Playground
JavaScript
function Map(sizeX, sizeY)
{
this.sizeX = sizeX;
this.sizeY = sizeY;
// you're not using these arrays. Why are they in your example code?
var cityArr = [],
cityXY = [];
}
Map.prototype = {
generateCity: function(cityNum) {
console.log("cityNum: " + cityNum);
}
}
var $ = new Map(10,10);
$.generateCity(2);