Function for a calendar formation in JavaScript

Let's wrap the calendar formation code in a function:

javascriptfunction draw(body, year, month) {
  let arr = range(getLastDay(year, month));
  
  let firstWeekDay = getFirstWeekDay(year, month);
  let lastWeekDay  = getLastWeekDay(year, month);
  
  let nums = chunk(normalize(arr, firstWeekDay, 6 - lastWeekDay), 7);
  createTable(body, nums)
}

In this case, we will be able to draw the calendar like this:

javascriptlet date  = new Date();
let year  = date.getFullYear();
let month = date.getMonth();

draw(body, year, month)
Задание 1

Do as described.