일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- JavaScript Deep Dive
- 백준 nodeJS
- CSS
- input class
- 코드스테이츠 메인프로젝트
- 프론트엔드
- javascript
- 이벤트 루프
- 유데미
- 알고리즘
- next/Image
- 정규표현식
- 재귀함수
- 백준
- 페이지네이션
- 자바스크립트
- Node js
- primitive type
- OSI 7계층
- 코드스테이츠
- Native select
- sort
- kakao map api
- 버블정렬
- 자료구조
- 코딩테스트
- 배열
- react js
- MUI
- nodejs
- Today
- Total
목록코딩테스트 (2)
신입 개발자에서 시니어 개발자가 되기까지
1. 처음 오답 const fs = require("fs"); const number = fs.readFileSync("example.txt").toString().trim(); function recursive(num) { if (num > 1) return num * recursive(num - 1); } console.log(recursive(number)); Num이 1일 때 어떻게 해야하는지 정의하지 않아서 undefined이 출력되고, 결국 NaN이 출력된 듯하다. 2. 정답 const fs = require("fs"); const number = fs.readFileSync("example.txt").toString().trim(); function recursive(num) { if (num
실패 코드(런타임 에러) : 런테임 에러가 왜 나는 지 모르겠다. 문제 의도대로 풀지 않아서 그런가?? 출력은 잘 되는데 런타임 에러가 뜸. const fs = require("fs"); const num = fs.readFileSync("example.txt").toString().trim(); let array = [0, 1]; function fibonacci(number) { array[array.length] = array[array.length - 2] + array[array.length - 1]; number === array.length - 1 ? console.log(array[array.length - 1]) : fibonacci(number); } fibonacci(num * 1);..