Coding Function Convention

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 Oct 14 13:39
Editor
Edited
Edited
2023 Oct 14 13:39
Refs
Refs

Function


한 화면 안에 전부 들어올 정도

  • 추천 - 50줄
  • 추천 - 최대 100줄
  • 필수- 최대 200줄
  • 필수 - multi line document
/* Function Description Argument Description Called by - another() */
  • 추천 - 외부 데이터를 바꾸는 함수는 다른 어떤 함수도 호출하면 안된다
    • 나머지는 다 순수함수
function toggleMap(radioEl, mapEl, server){ /* Change Map Main Function Called by - Radio Select, Init Document */ // if maked then display only if (radioEl.value === "maked"){ mapDisplay(mapEl, mapEl, server) return }
  • 1 line between double comment
function mapDisplay(radioEl, mapEl, server) { /* Show Only one Map Called by - toggleMap() */ for (let map of mapArray) map.mapEl.style.zIndex = "-1" crtMap.mapEl.style.zIndex = "0" console.log(crtMap.mapEl.id) for (let map of mapArray) console.log(map.mapEl.style) }
  • no blank line between one comment
 
 
 
 
 
 
 
 
 

Recommendations