[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
- getCurrentPosition
- padStart
- 스코프
- Let
- const
- Hook
- react
- localStorage
- classList
- var
- getitem
- Return
- 교착상태
- createElement
- console.log
- setinterval
- 브라우저 저장소
- 호이스팅
- innerText
- e.preventDefault()
- Navigator
- Geolocation
- 얕은복사
- setitem
- removeitem
- useState
- setTimeout
- new Date()
- 데드락
- 깊은복사
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함