
๐ Drag & Drop 4๏ธโฃ Abstract class & method abstract class => ์ธ์คํด์คํ ํ ์ ์๋ ํด๋์ค, ์์๋ง ๊ฐ๋ฅ abstract method => ์์ ํ ๊ตฌํ ๊ฐ๋ฅ / abstract ๋ฉ์๋๋ private๋ฅผ ์ฌ์ฉํ ์ ์๋ค ์ถ์ํํ ๊ฑฐ๋ฉด private์ ์ญ์ ํด์ผํจ.. ์ถ์ ํด๋์ค์ ์์ฑ์์์ ๋ฉ์๋๋ฅผ ๋ถ๋ฌ์ค๋ ๊ฒ๋ณด๋ค ํ์ฅํ ํด๋์ค์์ ๋ถ๋ฌ์ค๋ ๊ฒ์ด ๋ ์์ ์ ๋ฆฌ ์์ Extends class with generic ๋ถ๋ชจ๊ฐ ๋ ํด๋์ค์์ ์ ๋ค๋ฆญ์ผ๋ก ํ์ ์ง์ ํ์ฅ๋ ํด๋์ค์์ ์ ๋ค๋ฆญ์ผ๋ก ํน์ ํ์ ์ ์ ๋ฌ ์ ๋ฆฌ ์์ Getter return ๊ฐ์ด ์กด์ฌํด์ผํจ ์ ๊ทผ์ ์ผ๋ฐ ํ๋กํผํฐ์ฒ๋ผ (get hello()๊ฐ ์๋ค๋ฉด this.hello()๊ฐ ์๋๋ผ this.hello๋ก)..

๐ Drag & Drop 3๏ธโฃ Singleton pattern ๋ด์ฉ ์ถ๊ฐ ์์ Enum ๋ด์ฉ ์ถ๊ฐ ์์

๐ Drag & Drop 2๏ธโฃ Tuple is an array tuple์ JavaScript์๋ ์๊ณ TypeScript์๋ง ์๋ ํ์ ์ด๋ค. ๋ฐ๋ผ์ ํน์ ๋ณ์๋ฅผ tuple ํ์ ์ผ๋ก ์ง์ ํ์ ๋, ์๋์ ๊ฐ์ ๋ฐฉ๋ฒ์ผ๋ก tuple ํ์ ์์ ํ์ธํ ์ ์๋ค. const engineer: [string, string, string] = ['Apeach', 'Ogu', 'Choonsik']; engineer instanceof Tuple; // โ typeof engineer === 'tuple'; // โ (false) But tuple์ TypeScript์๋ง ์กด์ฌํ๋ ํ์ ์ด์ง๋ง JavaScript๋ก ์๊ฐํด๋ดค์ ๋ ๊ฒฐ๊ตญ์ ๋ฐฐ์ด์ด๋ค. ๊ทธ๋ฌ๋ฏ๋ก ์ ์ธํ ๋ณ์๊ฐ tuple์ด ๋ง๋์ง ํ์ธํ๋ ค๋ฉด ๋ฐฐ์ด์ธ์ง ์ฌ๋ถ๋ฅผ ํ์ธ..

Project Drag & Drop 1๏ธโฃ ! & as TypeScript์์ DOM ์กฐ์ํ ๋ ์ค๋ฅ ํด๊ฒฐํ๊ธฐ class ProjectInput { templateElement: HTMLTemplateElement; hostElement: HTMLDivElement; constructor() { this.templateElement = document.getElementById( 'project-input' )! as HTMLTemplateElement; this.hostElement = document.getElementById('app')! as HTMLDivElement; } } document.getElementById('id');์์ !๋ฅผ ์ถ๊ฐํ๋ ์ด์ ๋ TypeScript๊ฐ ์ด๊ฒ์ด null์ผ์..

Decorators 3๏ธโฃ Validation decorator ํ๋กํผํฐ ๋ฐ์ฝ๋ ์ดํฐ ์์ class Course { title: string; price: number; constructor(t: string, p: number) { this.title = t; this.price = p; } } const courseForm = document.querySelector('form')!; courseForm.addEventListener('submit', event => { event.preventDefault(); const titleEl = document.getElementById('title') as HTMLInputElement; const priceEl = document.getElementB..

Object & Array Big O of object ๊ฐ์ฒด๋ฅผ ์ฌ์ฉํ๊ธฐ ์ข์ ๋๋ ๋ค์๊ณผ ๊ฐ๋ค. ์ ๋ ฌํ ํ์๊ฐ ์์ ๋ ๋น ๋ฅธ ์ ๊ทผ / ์ฝ์ / ์ญ์ ๊ฐ ํ์ํ ๋ ๊ฐ์ฒด์ Big O ํ์ - O(N) ์ฝ์ - O(1) ์ญ์ - O(1) ์ ๊ทผ - O(1) ํ์์ด O(N)์ ๋ฐ๋ฅด๋ ์ด์ ๋ ํน์ ํ ์ ๋ณด๊ฐ ์ด๋ค ๊ฐ์ ์๋์ง ํ์ธํ๊ธฐ ๋๋ฌธ์ด๋ค. const information = { name: 'Shoupeach', isApeach: true, favoriteNumbers: [4, 8] }; information์ด๋ ๊ฐ์ฒด๊ฐ ์กด์ฌํ ๋ ์ฌ๊ธฐ์ true๋ผ๋ ๊ฐ์ด information์์ ์ด๋์ ์ ์ฅ๋์ด ์๋์ง ์๊ธฐ ์ํด์ ๋จผ์ name์ ํ์ธํ๊ณ ๊ฐ์ ํ์ธํ๋ค. name์ ๊ฐ์ Shoupeach์ด๊ธฐ ๋๋ฌธ์ ํต๊ณผํ ๋ค i..
React 1๏ธโฃ What is React? ๋ฆฌ์กํธ๋ ์ ์ธํ, ์ปดํฌ๋ํธ ๊ธฐ๋ฐ์ JavaScript ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ก UI๋ฅผ ๋ง๋ค๊ธฐ ์ํด ์ฌ์ฉ๋๋ค. JSX๋ผ๋ ๋ฌธ๋ฒ์ ์ฌ์ฉํด SPA๋ฅผ ๊ฐ๋ฐํ ์ ์๊ณ , CSR๋ก ์๋ํ๋ค. Declarative vs Imperative ๋ฆฌ์กํธ๋ ์ ์ธํ ํ๋ก๊ทธ๋๋ฐ์ด๋ค. ๊ทธ๋์ ์ ์ธํ์ด ๋ญ๋ฐ..?! ๐ค ์ ์ธํ์ ๋ฌด์์ ํ ๊ฒ์ธ์ง์ ํฌ์ปค์ค๋ฅผ ๋ ํ๋ก๊ทธ๋๋ฐ ๋ฐฉ๋ฒ์ด๋ค. ๋ฐ๋ฉด์ ์ ์ธํ์ ๋ฐ๋์ธ ๋ช ๋ นํ์ ์ด๋ป๊ฒ ํ ๊ฒ์ธ์ง์ ์ค์ ์ ๋๊ณ ์๋ค. ์ ์ธํ์ ๋ฌด์์๊ณผ ๋ช ๋ นํ์ ์ด๋ป๊ฒ๋ฅผ ์ค์ํ์์ ๋น๋์ด ์ด์ผ๊ธฐ ํด๋ณด์๋ฉด, ๋ง์๋ ๋ผ๋ฉด ๐์ ๋จน๋๋ค๊ณ ๊ฐ์ ํ ๋ ์๋์ ๊ฐ์ ์ฐจ์ด๋ฅผ ๋ณด์ธ๋ค๊ณ ํ ์ ์๊ฒ ๋ค.. ์ ์ธํ (๋ฌด์์ ๐ค) ์ปต๋ผ๋ฉด์ ๋จน์๋! ๋ช ๋ นํ (์ด๋ป๊ฒ ๐) ๋๊ป ํํ์ ์ฉ๊ธฐ๋ฅผ ๊ฐ์ง ๋ผ๋ฉด์ ๋๊ป์..

Git What is Git? Git์ ๋ฒ์ ์ ๊ด๋ฆฌํ๋๋ฐ ๋์์ ์ฃผ๋ VCS(Version Control System) ์ค ํ๋์ด๋ค. VCS ์ค์์๋ DVCS(Distributed Version Control System)์ผ๋ก, ์๋ฒ๊ฐ off-line์ด๊ฑฐ๋ ์ธํฐ๋ท์ด ์ฐ๊ฒฐ๋์ด ์์ง ์์ ๋๋ ๊ฐ๋ฐ์ ์งํํ ์ ์๊ณ ์๋ฒ์ ์ ์ฅ๋ ๋ฒ์ ์ด ์ญ์ ๋์ด๋ ๋ณต๊ตฌ๊ฐ ๊ฐ๋ฅํ ๊ฒ์ด ํน์ง์ด๋ค. Installation ๋๋ macOS๋ฅผ ์ฌ์ฉํ๊ณ ์๊ธฐ ๋๋ฌธ์ mac์์ Git ์ค์นํ๋ ๋ฐฉ๋ฒ์..๐ ์ฐ์ ์์คํ ํฐ๋ฏธ๋ ์ฐฝ์ ๋์์ค๋ค. ํฐ๋ฏธ๋ ์ฐฝ์ ๋ค์์ ๋ช ๋ น์ด๋ฅผ ์ณ์ค๋ค. git ๋ช ๋ น์ด๋ฅผ ์น๋ฉด ์ค์นํ๋ผ๋ ์ฐฝ์ด ๋ฐํ ๋ฐ, ์ค์น ๋ฒํผ์ ๋๋ฅด๋ฉด ์ค์น ๋! ๋๋ ์ด๋ฏธ ์ค์น๋์ด์๋ ์ํ์ด๊ธฐ ๋๋ฌธ์ ์บก์ณ๋ฅผ ํ ์ ์์์..๐ ์ค์น๋ฅผ ์๋ฃํ๊ณ ..

Decorators 2๏ธโฃ Decorator the synthetic sugar ํด๋์ค ๋ฐ์ฝ๋ ์ดํฐ๋ constructor๋ฅผ ๋ฐํํ๋ฉด์ ๊ธฐ์กด constructor๋ฅผ ํ์ฅํ ์ ์๋ค. constructor๋ฅผ ํ์ฅํ ๋ super();๋ ๊ธฐ์กด ํด๋์ค ํ์ฅ์์์ ๋ง์ฐฌ๊ฐ์ง๋ก ๊ธฐ์กด ํด๋์ค์ ์ ๋ณด๋ฅผ ๊ธฐ์ตํ๊ณ ์ถ์ ๋ ์ฌ์ฉํ๋ฉด ๋๋ค. function ClassDeco() { return function(target: T) { return class extends target { constructor(..._: any[]) { super(); // not necessary /* write your code */ } } } } @ClassDeco class Person { name = 'Shou'; get name() {..

Decorators 1๏ธโฃ What is Decorators? ํด๋์ค, ํ๋กํผํฐ, ์ก์ธ์, ๋ฉ์๋, ํ๋ผ๋ฏธํฐ์ ์ฒจ๋ถํ ์ ์๋ ํน๋ณํ ํจ์์ด๋ค. ๋ฐ์ฝ๋ ์ดํฐ๊ฐ ๋ถ์ ํด๋์ค ๋ฑ๋ฑ ์์๋ ๋ฐ์ฝ๋ ์ดํฐ์์ ์ ์๋ ๊ธฐ๋ฅ์ด ๋์ํ๋ค. ์ ์ํ ๋ฐ์ฝ๋ ์ดํฐ ํจ์๋ฅผ @ ๊ธฐํธ๋ฅผ ๋ถ์ฌ ์คํํ ์ ์๋ค. function ClassDeco(constructor: Function) { console.log('Logging...'); console.log(constructor); } @ClassDeco class Person { name = 'Shou'; constructor() { console.log('Creating person object...'); } } /* Logging... class Person { constructo..

Generics 2๏ธโฃ Keyof Constraint ์ ๋ค๋ฆญ์ผ๋ก ๊ฐ์ฒด์ ๋ํ ์ ์ฝ ์กฐ๊ฑด์ ์ค ๋, ํค ๊ฐ์ ํ์๋ก ํ๋ค๋ฉด keyof๋ฅผ ์ฌ์ฉํ ์ ์ฝ ์กฐ๊ฑด์ ์ฐ๋ฉด ์ค์๋ฅผ ๋ฐฉ์งํ ์ ์๋ค. function extractAndConvert( obj: T, key: U ) { return 'Value: ' + obj[key]; } extractAndConvert({}, 'name'); // Error occurred ์ ๋ค๋ฆญ T์ ์ ์ฝ ์กฐ๊ฑด์ผ๋ก object๋ฅผ ์ค์ ํด์ฃผ์๊ณ , U์ ์ ์ฝ ์กฐ๊ฑด์ผ๋ก T์ key๋ฅผ ์ค์ ํด์ฃผ์๋ค. extractAndConvert๋ก ๋น ๊ฐ์ฒด({})์ name์ด๋ผ๋ ๋ฌธ์์ด์ ์ ๋ฌํ์ ๋, ๋น ๊ฐ์ฒด์๋ name์ด๋ผ๋ ํค ๊ฐ์ด ์๊ธฐ ๋๋ฌธ์ ์ปดํ์ผ ์ค๋ฅ๊ฐ ๋๋ค! ์ ๋ค๋ฆญ์ผ๋ก U extends keyof..

Big O Notation Need for Big O Notation "๋ฌธ์์ด์ ๋ฐ์์ ์ด๋ฅผ ๋ค์ง์ด ์ถ๋ ฅํ๋ ํจ์๋ฅผ ์์ฑํ์์ค." for๋ฌธ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ, ๋ด์ฅ ๋ฌธ์์ด ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ๋ฑ๋ฑ ์ด์ ๋ํ ํด๊ฒฐ์ฑ ๋ง 10๊ฐ์ง๊ฐ ๋๋๋ค... ๐ซ ์ด ์ค์ ๊ฐ์ฅ best์ธ ๋ฐฉ๋ฒ์ ๋ฌด์์ผ๊น? ์ฌ๋ฌ ์ฝ๋๋ฅผ ๋น๊ตํ๊ณ ์ฑ๋ฅ์ ํ๊ฐํ ์ ์๋ ๋ฐฉ๋ฒ์ด ์๋ค๋ฉด ์ข์ง ์์๊น? What is Big O Notation? 1๋ถํฐ n๊น์ง ๋ํ๋ ํจ์๊ฐ ์๋ค๊ณ ํ ๋, 2๊ฐ์ง ๊ฒฝ์ฐ๋ฅผ ์๊ฐํด ๋ณผ ์ ์๋ค. function add1(n) { let result = 0; for (let i = 1; i = 0; j--) { console.log(j); } } ์ด 2๊ฐ์ for๋ฌธ์ด ์๊ธฐ ๋๋ฌธ์ O(N) + O(N)์ผ๋ก ๊ฒฐ๊ตญ O(N)์ธ..