what is the purpose of comma in declaring variables (javascript)? [duplicate]

what is the purpose of comma (,) after div?

var div, container = document.getElementById("container");

is it for declaring two variables at ones or something else

here is the rest of the code:

for (var i = 0; i < 5; i++) {
  div = document.createElement("div");
  div.onclick = function() {
    alert("This is box #" + i);
  };
  container.appendChild(div);
}