Index: arms/js/reqReview.js =================================================================== diff -u -re4c3d2f3b4c28d70b6776ef0d9aafa97687c0390 -rc8a55a1a64c643e528da4b380f393889e64c4c16 --- arms/js/reqReview.js (.../reqReview.js) (revision e4c3d2f3b4c28d70b6776ef0d9aafa97687c0390) +++ arms/js/reqReview.js (.../reqReview.js) (revision c8a55a1a64c643e528da4b380f393889e64c4c16) @@ -10,9 +10,9 @@ makeTemplate("./js/reviewList.do", makeReviewList); }); -function makeTemplate(url, bindTemplate) { +const makeTemplate = function (url, bindTemplate) { getData(url).then((data) => bindTemplate(data)); -} +}; const getData = (url) => { const data = fetch(url).then((response) => { @@ -23,7 +23,7 @@ }; // make review classify menu -function makeClassifyMenus(data) { +const makeClassifyMenus = function (data) { const reviewClassify = document.getElementById("review-classify"); let menus = ""; data.forEach( @@ -35,10 +35,10 @@ `) ); reviewClassify.innerHTML = menus; -} +}; // make review list -function makeReviewList(data) { +const makeReviewList = function (data) { const reviewList = document.getElementById("review-list"); let list = ""; data.forEach( @@ -54,7 +54,7 @@ ); reviewList.innerHTML = list; -} +}; const dateFormat = (time = 0) => { let date = time ? new Date(time).toISOString() : new Date().toISOString();