일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 코딩게임
- Jest
- HTML 태그 모음
- JavaScript Runtime
- supertest
- foreach
- global scope
- local scope
- npm 설치
- dot notation
- version control system
- 스프린트 리뷰
- nvm 설치
- 슈도코드
- package.json
- includes
- immutable
- TIL
- Splice
- 호이스팅
- for of
- testbuilder
- Bracket Notation
- javascript 기초
- for in
- 코드스테이츠 1일차
- indexof
- node 설치
- 코플릿
- 2번째 페어
- Today
- Total
목록코드스테이츠/ALGORITHM (6)
Honey-Programming
보호되어 있는 글입니다.
타입) 6-1_convertToString (문자열 변환) - 주어진 파라미터를 문자열의 형태로 변환 파라미터가 객체이거나, 배열일 경우는 신경안써도 됨 function convertToString(anything) { return String(anything); } // 문자열(string) 타입을 리턴 // 숫자는 문자열 타입으로 바꾸어 리턴 // boolean 값도 문자열 타입으로 바꾸어 리턴 let output = convertToString(120); console.log(output); // --> '120' let output2 = convertToString('hello'); console.log(output2); // --> 'hello' let output3 = convertToStri..

Math 메서드 : 수학적인 상수와 함수를 위한 속성과 메서드를 가진 내장 객체 1) 속성(Property) 1. Math.PI : 원의 둘레와 지름의 비율. 즉, π :3.141592 2. Math.SQRT1_2 : ½의 제곱근. 약, 0.707 3. Math.SQRT2 : 2의 제곱근. 약, 1.414 2) 메서드(Method) 1. Math.abs(x) : 절대값을 반환 Ex) Math.abs('-2'); Math.abs(-2); Math.abs([2]); => 2 Math.abs(null); Math.abs(''); Math.abs([]); => 0 Math.abs([1, 2]); Math.abs({}); Math.abs('string'); Math.abs(); => NaN 2. Math.cbrt..

문자열) 4-1_getFullName - 이름과 성이 주어졌을때, 이름과 성이 띄어쓰기 하나를 사이에 둔 단일 문자열을 반환 function getFullName(firstName, lastName) { return firstName + ' ' + lastName; } // 이름(firstName)과 성(lastName)을 이용해서 전체 이름을 리턴 // 문자열(string) 타입으로 리턴 let output = getFullName('Joe', 'Smith'); console.log(output); // --> 'Joe Smith' 문자열) 4-2_getLengthOfWord - 단어가 주어졌을때, 단어의 길이를 반환 function getLengthOfWord(word) { if(word !== un..

변수) 1-1. 변수 선언하기(Declaration) - 변수(Variable) : 변할 수 있는 값 - 변수의 선언 : 어떤 값(value)를 넣을 수 있는 자리를 컴퓨터 메모리에 미리 잡아두었다는 의미 // let` 키워드를 사용하여 `course`라는 변수를 선언하시오 let course; 변수) 1-2. 변수에 값 할당하기(Assignment) // TODO : 선언되어 있는 변수 course에 문자열 "codestates"를 할당하세요. let course; course = 'codestates'; // 선언과 할당을 한 줄에 작성 할 수 있다. let course = 'codestates'; 만약 선언을 하지 않고 할당한다면, 에러가 발생 변수) 1-3. 값의 표현(Expression) // ..
[$-0. 변수] 01_declaration(변수 선언하기) `let` 키워드를 사용하여 `course`라는 변수를 선언 let course; [$-0. 변수] 02_assignment(변수에 값 할당) 선언되어 있는 변수 course에 문자열 "codestates"를 할당 let course; course = 'codestates'; [$-0. 변수] 03_expression(값의 표현) num1에 5를 할당하고, num2에 7을 할당한 후, result에 num1과 num2의 곱을 할당 let num1, num2, result; num1 = 5; num2 = 7; result = num1 * num2; [$-1. 함수] 01_getRunCatDistance(함수) TODO: 속력(speed), 시간(..