전체 글 64

[프로그래머스/JS] x만큼 간격이 있는 n개의 숫자

링크 https://school.programmers.co.kr/learn/courses/30/lessons/12954 풀이 function solution(x, n) { var answer = []; for (let i = 1; i val * (index + 1)) } 기타 Array()와 new Array()의 차이가 궁금해져서 검색해보았다. 결론적으로 배열을 생성하고 반환한다는 점에서 두개는 동일하다. Array(...)와 같은 함수로 호출됐을때 new가 inject됨. 참고 내용1 - also create and initializes a new Array when called as a function rather than as a constructor. Thus the function call A..

코딩 테스트 2022.08.16

Already included file name '파일경로/파일.ts' differs from file name

에러 메시지 module "c:/파일경로/프로젝트명/src/features/auth/auth.interface" Already included file name 'c:/파일경로/프로젝트명/src/features/auth/Auth.interface.ts' differs from file name 'c:/파일경로/프로젝트명/src/features/auth/auth.interface.ts' only in casing. The file is in the program because: Imported via "./Auth.interface" from file 'c:/파일경로/프로젝트명/src/features/auth/authSlice.ts' Imported via "./Auth.interface" from fil..

기타 2022.08.12

[프로그래머스/JS] 부족한 금액 계산하기

링크 https://school.programmers.co.kr/learn/courses/30/lessons/82612?language=javascript 풀이과정 이용금액은 이용횟수 * n의 합 모자라는 금액 return 부족하지 않으면 0을 return 소스코드 function solution(price, money, count) { var answer = 0; for (let i = 1; i money ? answer - money : 0; } 다른 사람의 풀이 function solution(price, money, count) { const tmp = price * count * (count + 1) / 2 - money; return tmp > 0 ? tmp : 0; } 가우스 공식을 이용한 ..

코딩 테스트 2022.08.12

[TIL] day10 - 모듈 소개, redux-persist 적용, serialize, 문제풀이1

2022년 08월 10일 수요일 오늘 공부한 내용 리스트를 클릭하면 작성 글로 이동합니다. 1️⃣ javascript.info - 모듈 소개 : 정리 2️⃣ redux-persist 적용 3️⃣ serialize란? 4️⃣ 부족한 금액 📝 여유를 갖기로 했다. 불안해하고 조급해 한다고 달라지는 것은 없다. 바꿀수 있는 것에 집중하기. 우선순위를 잘 따져 주어진 시간을 유의미하게 쓰자.

TIL 2022.08.10

[RTK-Query] Warning: Middleware for RTK-Query API at reducerPath "api명" has not been added to the store.

에러상황 app.bundle.js:9748 Warning: Middleware for RTK-Query API at reducerPath "authApi" has not been added to the store. Features like automatic cache collection, automatic refetching etc. will not be available. 위와 같은 에러가 떴다. 에러 메시지를 잘 읽어보면 reducerPath에 "authAPI"에 RTK-Query API를 위한 미들웨어가 store에 추가되지 않았습니다. 자동 캐쉬 수집, 자동 리패칭 등과 같은 기능은 사용할 수 없을 것입니다. 라고 적힘. 공식 문서 Configure the store을 살펴보자. Configure..

frontend 2022.08.08

[npm] Failed to install dependencies - npm 7 버전

storybook을 공부해보고 싶어 유튜브 영상을 따라했다. 영상에서 tsdx라는 zero cli tool을 사용하길래 그대로 따라했는데 오류때문에 정상적으로 튜토리얼을 따라할 수 없었다. > npx tsdx create 파일명 으로 명령 작업파일을 tsdx로 생성하고 template 선택, author 입력하면 package가 자동으로 install되야하는데 아래와 같은 에러가 떴다. Failed to install dependencies Error: Command failed with exit code 1: npm install @babel/core @size-limit/preset-small-lib @storybook/addon-essentials @storybook/addon-info @story..

frontend 2022.08.08

[ESlint] Unexpected console statement. eslint(no-console)

console.log에 노란 밑줄이 생겨서 검색해보니 eslint의 설정을 바꾸면 되는 문제였다. .eslintrc.js 혹은 .eslintrc.json 설정 파일로 가서 확인 "no-console": "warn"으로 설정해두어서 warn이 뜸. "warn"을 "off"로 바꿔주었다. 혹은 일부분만 허용 할수 있다. console.clear / console.error / console.info 등등은 허용. "no-console": [ "warn", { "allow": ["clear", "info", "error", "dir", "trace", "log"] } ] 출처 : https://stackoverflow.com/questions/34215526/eslint-how-to-disable-unexpe..

frontend 2022.08.07

[TIL] day07 - Redux Toolkit, dotenv 환경변수, Optimistic UI

2022년 08월 02일 화요일 오늘 공부한 내용 리스트를 클릭하면 작성 글로 이동합니다. 1️⃣ Redux Toolkit 세팅 (8/7까지 작성) 2️⃣ dotenv로 클라이언트에 환경변수 설정하기 (8/7까지 작성) 3️⃣ Optimistic UI란 읽은 자료 3️⃣ https://story.pxd.co.kr/1193 📝 새로 접한 IT용어를 정리하기 시작했다. 나만의 사전을 만드는게 목표이다.

TIL 2022.08.02

[TIL] day06 - DNS의 개념, 문제풀이1

2022년 07월 30일 토요일 오늘 공부한 내용 리스트를 클릭하면 작성 글로 이동합니다. 1️⃣ DNS의 개념 2️⃣ 프로그래머스 - 내적 📝 이력서를 업데이트 했다. 이력서 업데이트를 계속 미뤘는데 현실도피를 하고 싶었나보다. 현재까지 무엇을 했는지, 앞으로 무엇을 할 것인지 많은 생각을 하였다. 조바심 낼 것 없이 차근차근 해나가면 되는 거다. 평상시에 부정문을 많이 쓰나? '부정문 쓰지 않기' 조건이 참 어렵네(•_•)

TIL 2022.07.31
728x90