일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- opencv
- nodejs
- postgresql
- API
- Linux
- Git
- UI
- C++
- js
- html
- Express
- mongo
- GAN
- figma
- sqlite
- react
- CV
- SOLID
- review
- PRISMA
- vscode
- ts
- DB
- PyTorch
- python
- frontend
- ML
- Three
- CSS
- ps
- Today
- Total
목록2025/03 (20)
아카이브
Arrow function은 ES2015부터 새로 추가된 함수 선언 방식입니다. 기존의 function 예약어를 사용해 선언하던 함수를 다음과 같이 선언할 수 있습니다.// 이 함수와const func = function(arg) { return arg * 2;}// 이 함수는 동일합니다.const func = (arg) => { return arg * 2;}만약 받는 매개변수가 하나 뿐이라면, 매개변수의 괄호( )를 생략할 수 있습니다.const func = arg => { return arg * 2;}만약 함수 부분이 return 문 하나로만 구성되어 있다면, 함수 부분의 중괄호{ }도 생략할 수 있습니다.const func = (arg) => arg * 2;단, 객체를 반환할 때는 ..
1. argumentargument는 함수에서 가변적인 매개변수들을 받아 접근할 때 사용할 수 있습니다. argument는 유사 리스트의 형태로 반환되어 리스트와 관련된 메소드를 사용할 수는 없습니다. 단, argument.length와 argument[0] 등의 인덱스 접근은 가능합니다.const func1 = (arg1, arg2) => { console.log(arg1); console.log(arg2);}func1(1); // 1, undefinedfunc1(1, 2); // 1, 2func1(1, 2, 3); // 1, 2 (3은 출력되지 않음)const func2 = (arg1, arg2) => { for (const arg of arguments){ ..
문제You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. You may assume that you have an infinite number of each kind of coin.예시Example 1:Input: coins =..

문제You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find two lines that together with the x-axis form a container, such that the container contains the most water. Return the maximum amount of water a container can store. Notice that you may not slant the container.예시Exampe 1Input: height..
JavaScript에서는 and(&&)와 or(||) 연산을 할 때 첫 번째 값에 무엇이 오느냐에 따라 출력값이 달라집니다.operand 1operand 2ANDORTruthyTruthy operand 2operand 1TruthyFalsyoperand 2operand 1FalsyTruthyoperand 1operand 2FalsyFalsyoperand 1operand 2그리고 이를 이용하여 특정 변수에 기본값을 지정하는 코드를 작성할 수도 있습니다.const perhapsNull = null;// perhapsNull이 false라면 'notNull'을, true라면 perhapsNull을 반환합니다.const value = perhapsNull || 'notNull';여기서 true / false 값..
문제You are given a neural network with n layers. Each layer has a number of neurons represented by an array layer[], where layer[i] is the number of neurons in the i-th layer.The network undergoes updates in a sequence of generations. In each generation, you are allowed to increase the number of neurons in at most one layer, according to the following rules:In odd-numbered generations (1st, 3rd, ..

JavaScript를 다루다보면 es6 혹은 es 접두사가 붙은 용어를 볼 수 있습니다. 이 es는 ECMA Script의 약어로, ECMA에서 명시한 문서자료를 가리킵니다.ECMA?ECMA(또는 Ecma) international은 정보와 통신 시스템을 위한 국제적 표준화 기구입니다. JavaScript는 그 역사가 오래된 만큼, 시간이 지남에 따라 많은 부분이 수정되어 왔습니다. Ecma international은 이러한 수정 사항들을 Ecma-262라는 이름의 문서에서 기록/관리해오고 있습니다. 이 문서에 기반한 언어 지침을 Ecma Script, 즉 ES라고 합니다.ES는 개정판이 나오면서 넘버링을 부여했고, ES1에서 시작해 2015년 ES6가 출시된 후로는 넘버링 대신 매 년도를 버전 이름으로..
문제Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets.예시Example 1:Input: nums = [-1,0,1,2,-1,-4] Output: [[-1,-1,2],[-1,0,1]]Explanation: nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0. nums[1] + nums[2] + nums[4] = 0 + 1 + (-1..