0

what's the best style to pass 'this.dayNames' and use it within the nested function (createCalendar())?

function DateNames()
{
    this.dayNames = ["Su", "M", "T", "W", "Th", "F", "S"];
}

DateNames.prototype.render = function(date)
{
    console.log(date);
    createCalendar()
    function createCalendar()
    {
        console.log(this.dayNames);
    }
}
Hello
  • 1
  • 1

0 Answers0