<%for (var i = 0; i < doctorList.length; i++) {%>
<%=doctorList[i].name%>
<%=doctorList[i].deptName%>
<%=doctorList[i].title%>
<%if (i === doctorList.length - 1) {%>
<%} else {%>
<%}%>
<%}%>