프로그래밍 언어
-
[Inflean 장기효] 입문강의프로그래밍 언어/TypeScript 2023. 7. 20. 17:53
실습환경에서 주의할 내용 ESlint에서 잡아주는 문법을 보아야하기때문에 설치 확인을 꼭합시다 crtl +, 를 통해서 format on save 비활성화를 통해서 prettier와 beatify를 꺼야한다. (eslint만으로만 문법을 확인하기 위해서) 할일 관련 프로젝트 파일을 알아보자 tsconfig.json compilerOptions 세부사항을 어떤식으로 주느냐에 대한 얘기가 있따 allowJs , checkJs, noImplicaitAny 가 무엇인지 알아봐야겠구만 붉은색 에러는 ts -=> js 로 변화할 때 제거를 꼭 해주어야한다. esilnt가 ts 문법을 보조해주고 있다 any 라는 타입은 무엇인가? 모든 타입을 통칭하는 것 함수의 반환타입에 대해서 알아보자 void 란 무엇인가? 반환..
-
[Inflean 장기효] 입문강의 -문법-프로그래밍 언어/TypeScript 2023. 7. 13. 15:30
변수타입 // JS 문자열 선언 const str = "hello"l // TS 문자열 선언 let str:string = "hello"; let num : number = 10; // TS 배열 선언 let arr : Array = [1, 2, 3]; // arr라는 배열은 안에 number만 들어올 수 있는 Array이다 let items : number[] = [1, 2, 3]; let animal : Array = ["cat", "dog"] // 배열 안에 숫자를 넣으면 빨간줄이 생긴다 // TS 튜플 선언 let address : [string, number] = ["gangnam", 123]; //배열의 각각 index에 타입을 정의 할 수 있다 // TS 객체 선언 let obj: objec..
-
[Inflean 장기효] 입문강의 -문법 이전 내용-프로그래밍 언어/TypeScript 2023. 7. 13. 14:53
교안 : 타입스크립트 핸드북 (joshua1988.github.io/ts/) 타입스크립트란? 자바스크립트에 타입을 부여한 언어이다 자바스크립트와는 다르게 브라우저에서 실행하기 위해 파일을 한번 변환해주는 과정(컴파일)이 필요하다 타입스크립트는 왜 써야하는가? JS를 써서 비동기 처리를 할 때 [object Object] 이런 데이터들을 몇번 보았는데 이러한 부분을 타입스크립트를 쓴다면 좀 더 명확하게 연결 할 수 있다. 또한 오탈자로 인해서 정보를 불러오지 못하는 경우(undefined) 에러로 연결 될 수 있다 이런 부분도 타입스크립트를 통해 보완 할 수 있다. 코드 상으로 알 수 없는 데이터의 모습을 파악 할 수 있다. (에러의 사전 방지) 브라우저를 실행해서 data 값을 보고 그것을 기반으로해서 ..
-
[스파르타코딩클럽] Javascript 문법종합반 1~ 2주차프로그래밍 언어/JavaScript 2023. 6. 12. 15:43
1주차 1 주차는 기본적인 내용과 반복문 및 조건문에 대한 내용으로 강의자료를 참고하면서 복기시키면 될 법한 내용이 주를 이루고 있다. - 삼항연산자 let x = 10; let result = (x > 5) ? "크다" : "작다"; console.log(result); // "크다" - 타입연산자 console.log(typeof 123); // "number" console.log(typeof "123"); // "string" console.log(typeof true); // "boolean" console.log(typeof undefined); // "undefined" console.log(typeof null); // "object" console.log(typeof {}); // "ob..