분류 전체보기(107)
-
반응형 페이지 작업할 때, 분기점 순서 설정하는 법
반응형(responsive) 페이지 작업할 때, css에서 미디어 쿼리(media query) 분기점(breakpoint) 작성 순서입니다 분기점은 해당 프로젝트에 맞게 설정하시면 됩니다 Mobile First 작은 너비 순으로 시작 @media screen and (min-width: 768px) { /* 768px 이상 */ } @media screen and (min-width: 1024px) { /* 1024px 이상 */ } Desktop First 넓은 너비 순으로 시작 @media screen and (max-width: 1023px) { /* 1023px 이하 */ } @media screen and (max-width: 767px) { /* 767px 이하 */ }
2022.10.12 -
프로젝트 협업 시, 자주 활용되는 git 명령어
git은 소스코드를 저장하고 공유하는 공간이다 프로젝트 협업 시, 자주 활용되는 git 명령어를 알아보자 Setting git --version #git의 설치 유무 및 버전 확인 git config --list #설정 확인 #github 가입시, 이름과 이메일 git config --global user.name "name" git config --global user.email "email" git config --list #설정 재확인 CLI 설정 관리가 어렵다면 Source Tree 나, Github Desktop의 GUI(Graphic User Interface) 툴로 연동하자 Team Leader git init #현재 경로에서 .git 파일 생성됨, 앞으로 git으로 관리하겠다는 뜻이다! l..
2022.10.11 -
Array APIs - find(), findIndex(), filter(), map(), some(), every(), reduce(), sort()
find : 배열을 순회하며 요소들 중, 조건에 만족하는 첫 번째 요소만 반환 find(predicate: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined; /** * Returns the value of the first element in the array where predicate is true, and undefined * otherwise. * @param predicate find calls predicate..
2022.10.07 -
Array APIs - join(), split()
join : 배열을 원하는 구분자를 더해서 문자열로 반환 join(separator?: string): string; /** * Reverses the elements in an array in place. * This method mutates the array and returns a reference to the same array. */ const arr = ['Lorem', 'ipsum', 'dolor', 'sit']; const result = arr.join(''); console.log(result); //Loremipsumdolorsit const result = arr.join(' '); console.log(result); //Lorem ipsum dolor sit split : 구분..
2022.10.06 -
Array APIs - indexOf(), lastIndexOf(), includes()
indexOf : 특정한 요소의 위치를 찾을 때 indexOf(searchElement: T, fromIndex?: number): number; /** * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. */ //특정한 요소의 위치를 찾을 때 const bread = ['🍞', '🥖', '🥐', '🥨']; console.l..
2022.10.05 -
Array APIs - splice(), slice(), concat()
splice : 삭제한 배열을 반환하고 기존의 배열을 업데이트함 splice(start: number, deleteCount?: number): T[]; /** * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. * @param start The zero-based location in the array from which to start removing elements. * @param deleteCount The number of elements to remove. * @returns An array containing the elemen..
2022.10.05