함수에 대한 주석

읽기 쉽고 알기 쉬운 변수명으로 만들기

// great - "name" implies strings
const subjectName = ['math', 'english', 'korea'];
const subject = [{name: 'math', difficulty: 'easy’}]
// good
const isOpen = true; const canWrite = true; const hasFruit = true;
// good
let totalNum = 54;
// good
const getUser = (firstName, LastName) => firstName + LastName

변수(함수) 명에 대한 이름