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