[JS] 함수에 console.log 대신 return 쓰는 이유?
const calculator = { add: function (a, b) { console.log(a + b); }, minus: function (a, b) { console.log(a - b); }, multiple: function (a, b) { console.log(a * b); }, divide: function (a, b) { console.log(a / b); }, power: function (a, b) { console.log(a ** b); }, }; calculator.add(10, 5); calculator.minus(10, 5); calculator.multiple(10, 5); calculator.divide(10, 5); calculator.power(10, 5); 위와 같..
개발공부/JS
2023. 6. 20. 20:01
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- getitem
- 교착상태
- 브라우저 저장소
- padStart
- 데드락
- 깊은복사
- setTimeout
- react
- Return
- removeitem
- 호이스팅
- new Date()
- const
- createElement
- getCurrentPosition
- e.preventDefault()
- 얕은복사
- var
- innerText
- localStorage
- Navigator
- setitem
- setinterval
- Hook
- Let
- 스코프
- Geolocation
- classList
- console.log
- useState
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함