Super - ๋ถ๋ชจ ํด๋์ค - super ํค์๋๋ constructor ์์์๋ ํจ์์์๋ง ์ฌ์ฉํ ์ ์๋ค. class Person { name; year; constructor(name, year) { this.name = name; this.year = year; } sayHello() { return `Hello I'm ${this.name}`; } } class Singer extends Person { sing() { return `๋
ธ๋ํฉ๋๋ค.`; } constructor(name, year, part) { // ๋ถ๋ชจ ํด๋์ค // Person() ์ด๊ฑฐ๋ ๋๊ฐ์ super(name, year); this.part = part; } sayHello() { // undefined์
๋๋ค. rap ํํธ์
..
๐ง TIL
์์, Inheritance - ์์์ ๊ฐ์ฒด๋ค ๊ฐ์ ๊ด๊ณ๋ฅผ ๊ตฌ์ถํ๋ ๋ฐฉ๋ฒ์ด๋ค. - ์ํผ ํด๋์ค(๋๋ ๋ถ๋ชจ ํด๋์ค)๋ฑ์ ๊ธฐ์กด์ ํด๋์ค๋ก๋ถํฐ ์์ฑ๊ณผ ๋์์ ์์๋ฐ์ ์ ์๋ค. - ๊ณตํต๋๋ ๋ฐ์ดํฐ๋ฅผ ์ ๋ฆฌํ ์ ์๋ ๋ฐฉ๋ฒ์ด๋ค. class Person { name; year; constructor(name, year) { this.name = name; this.year = year; } } class Singer extends Person { sing() { return `๋
ธ๋ํฉ๋๋ค.`; } } class Actor extends Person { acting() { return `์ฐ๊ธฐํฉ๋๋ค.`; } } const zico = new Singer("zico", 1993); console.log(zico); // ..
Static - ๊ฐ์ฒด์ ๊ท์๋์ง ์๋๋ค. - ํด๋์ค์ ์ง์ ๊ท์๋ผ์ new๋ก ์ธ ํ์ ์๋ค. class Person { name; year; static groupName = '์ค'; constructor(name, year) { this.name = name; this.year = year; } // ํจ์๋ ๊ฐ๋ฅ static returnGroupName() { return '์ค'; } } const soo = new Person('soo', 1997); // ๊ฐ์ฒด์ ๊ท์๋์ง ์๋๋ค. console.log(soo);// Person { name: 'soo', year: 1997 } // ๊ทธ๋ผ ์ด๋์ ๊ท์๋ผ์๋? // ํด๋์ค ์์ฒด์ ๊ท์๋์ด์๋ค! console.log(Person.groupName)// ์ค..
Getter 1. ๋ฐ์ดํฐ๋ฅผ ๊ฐ๊ณตํด์ ์๋ก์ด ๋ฐ์ดํฐ๋ฅผ ๋ฐํํ ๋ 2. privateํ ๊ฐ์ ๋ฐํํ ๋ Setter 1. ๊ฐ์ ์ค์ ํด์ค๋ ๋ฌผ๋ก Setter ์์ด๋ ๋ฐ๊ฟ ์๋ ์์ง๋ง ํ๋กํผํฐ๋ฅผ private์ผ๋ก ๋ฐ๊ฟจ์๋๋ Setter์์ด ๋ฐ๊ฟ ์ ์๋ค. private์ ์ง์ ์ก์ธ์ค๊ฐ ๋ถ๊ฐ 2. Setter๋ ์ ์ํ ๊ฐ์ ๋ณ๊ฒฝํ๋ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ ๋ง์ด ์ ํธํ์ง๋ ์์ class Person { name; year; constructor(name, year) { this.name = name; this.year = year; } // Getter, Setter get getNameAndYear() { return `${this.name}-${this.year}`; } // ๋ฐ๊พธ๊ณ ์ถ์ ํ๋กํผํฐ์ ์ด๋ฆ๊ณผ ๊ฒน์น๊ฒ ๋ง์ด ์ค..
ํด๋์ค? - ๊ฐ์ฒด์งํฅ ํ๋ก๊ทธ๋๋ฐ์์ ํน์ ๊ฐ์ฒด(์ธ์คํด์ค)๋ฅผ ์์ฑํ๊ธฐ ์ํ ๋ณ์์ ๋ฉ์๋(ํจ์)๋ฅผ ์ ์ํ๋ ์ผ์ข
์ ํ์ด๋ค. - ์ ๋ณด๋ฅผ ์ผ๋ฐํํด์ ์ ๋ฆฌํ๋ ๋ฐฉ๋ฒ์ด๋ค! class person { // ์ด๋ค ํ๋กํผํฐ๊ฐ ์กด์ฌํ๋์ง ๋ฏธ๋ฆฌ ์ ์ํ๋ ๊ฒ์ ์์ฃผ ์ข์ ์ต๊ด! name; year; // ์์ฑ์ constructor(name, year) { this.name = name; this.year = year; } // ํด๋์ค ๋ด ๋ฉ์๋ ์ ์ // ์๋ฌต์ ์ผ๋ก ํจ์๋ผ๋๊ฑธ ์ธ์งํจ sayName() { return `์๋
ํ์ธ์ ์ ๋ ${this.name}์
๋๋ค.` } }
const soo1 = { name: 'sooyoung', age: 27 } const soo2 = { name: '์์', ...soo1, } const soo3 = { ...soo1, name: '์์', } console.log(soo2);// { name: 'sooyoung', age: 27 } console.log(soo3);// { name: '์์', age: 27 } - soo2๋ name: '์์'์ ๋จผ์ ์ ์ธ ํ์ผ๋ ์ ๊ฐ ์ฐ์ฐ์๋ฅผ ๊ทธ ๋ค์์ ํผ์ณ์คฌ์ผ๋ฏ๋ก '์์'์ผ๋ก name ๊ฐ์ด ๋ฐ๋์ง ์๋๋ค. - ์๋๋๋ก ๋ฐ๊ฟ์ฃผ๋ ค๋ฉด ์ ๊ฐ ์ฐ์ฐ์๋ฅผ ๋จผ์ ํผ์น๊ณ ๋์ ๋ฐ๊ฟ์ฃผ๋ ์์๋ก ์งํํด์ผ ํ๋ค.
Copy of Value - ๊ฐ์ ์ํ ์ ๋ฌ Copy of Reference - ์ฐธ์กฐ์ ์ํ ์ ๋ฌ - ๊ธฐ๋ณธ์ ์ผ๋ก ๋ชจ๋ primitive ๊ฐ์ ๊ฐ์ ์ํ ์ ๋ฌ์ด๋ค.(function, object, array ๋นผ๊ณ ๋๋จธ์ง) - ๊ฐ์ฒด๋ ์ฐธ์กฐ์ ์ํ ์ ๋ฌ์ด๋ค const soo1 = { name: 'sooyoung', age: 27 } const soo2 = soo1; const soo3 = { name: 'sooyoung', age: 27 } const soo4 = { ...soo3, } console.log(soo1 === soo2);// true console.log(soo1 === soo3);// false console.log(soo2 === soo3);// false console.log(soo3 ==..

http ์ํ ์ฝ๋ ๋ช๊ฐ์ง ์ ๋ฆฌํด๋ณด๊ธฐ ๐ข 1~ Informational ์์ฒญ์ด ์์ ๋์ด ์ฒ๋ฆฌ ์ค์ด๋ผ๋ ์๋ฏธ๋ฅผ ๊ฐ์ง๋ค. 100 Continue ์ฒ๋ฆฌ๊ฐ ๋์์ผ๋ ๋ค์์ผ๋ก ์งํ 101 Switching Protocols ์๋ฒ๊ฐ ํ๋กํ ์ฝ์ ์ ํ์ค 102 Processing ์๋ฒ๊ฐ ์์ฒญ์ ์์ง ์ฒ๋ฆฌ์ค์ด๋ผ ์ ๋๋ก๋ ์๋ต์ ์๋ ค์ค์ ์์ 103 Early Hints ์นํ์ด์ง์ ํ์ํ ๋ฆฌ์์ค์ ๋ํ ํํธ๋ฅผ ์ ๊ณตํ์ฌ ๋ฆฌ์์ค๋ฅผ ์ฌ์ ๋ก๋ํ์ฌ ๋ก๋ฉ์ ๋น ๋ฅด๊ฒ ๐ข 2~ Success ์์ฒญ์ด ์ ์์ ์ผ๋ก ์ฒ๋ฆฌ๋์๋ค๋ ์๋ฏธ๋ฅผ ๊ฐ์ง๋ค. 200 OK ํด๋ผ์ด์ธํธ์ ์์ฒญ์ ์๋ฒ๊ฐ ์ ์์ ์ผ๋ก ์ฒ๋ฆฌ 201 Created ํด๋ผ์ด์ธํธ์ ์์ฒญ์ ์๋ฒ๊ฐ ์ ์์ ์ผ๋ก ์ฒ๋ฆฌํ๊ณ ์๋ก์ด ๋ฆฌ์์ค๊ฐ ์๊น 202 Accepted ํด๋ผ์ด์ธํธ์ ์์ฒญ์ ์ ์์ ์ด๋, ..

SQL - JOIN ์ ๋ฆฌ ์์ ํ
์ด๋ธ Table: employees +--------+--------------+------------+---------+ | emp_id | emp_name | hire_date | dept_id | +--------+--------------+------------+---------+ | 1 | Ethan Hunt | 2001-05-01 | 4 | | 2 | Tony Montana | 2002-07-15 | 1 | | 3 | Sarah Connor | 2005-10-18 | 5 | | 4 | Rick Deckard | 2007-01-03 | 3 | | 5 | Martin Blank | 2008-06-24 | NULL | +--------+--------------+--..

์ฒซ ํ๋ก์ ํธ ํ๊ณ ๋ฅผ ์ด์ ์ผ ์์ฑํ๋ค๋.. ์ ์๋ ํ๊ณ ๊ธ์ ๊ธฐ๋กํ๋ ์ฉ๋๋ผ๊ณ ์๊ฐํ์๋๋ฐ ๋ง์ ๋ค๋ฅธ ํ ํ๋ก์ ํธ๋ฅผ ํด๋ณด๋ ๊ฐ์ ๋ฌธ์ ์ ์ด ๋ณด์ด๋ ๊ฑธ๋ก ๋ณด์ ์ ์ฒด์ ์ธ ํ ํ๋ก์ ํธ์ ๋ํ ๊ฐ๊ด์ ์ธ ์์ ์ผ๋ก ํ๊ณ ๋ฅผ ๊ผญ ์์ฑํ๋ ์๊ฐ์ ๊ฐ์ ธ์ผ๊ฒ ๋ค๊ณ ์๊ฐ์ด ๋ค์๋ค. 1. ๋ด๊ฐ ์ ํํ ํ๊ณ ๋ฐฉ์ - ๋ด๋ฐฐ์บ ์์ ์๋ ค์ค KPT ํ๊ณ ๋ฐฉ์์ด๋ค. KPT ํ๊ณ ๋? Keep, Problem, Try ์ง์ํ ๊ฒ, ๋ฌธ์ ๊ฐ ๋ ๊ฒ, ๋ค์์ ์๋ํ ๊ฒ ๊ฐ ์๊ฐ์ ๋ง์ถฐ ๋ค์ ๋ชฉ๋ก์ ์งํํ๋ฉฐ ํ๊ณ ํ๋ ๋ฐฉ์์ด๋ค. ์๊ฐ์ 50๋ถ ์ ๋๋ก ์งํ๋๋ฉฐ ๋ง์ฝ์ ์ํฉ์ ๋๋นํด 10๋ถ ์ ๋ ์ฌ์ ๋ฅผ ๊ฐ์ง์. ์งํ ์์๋ ์๋์ ๊ฐ๋ค. - KPT์ ๋ํด์ ์ค๋ช
: 5๋ถ - Keep, Problem ์์ฑ : 5๋ถ - ๊ฐ์ ์์ฑํ Keep, Problem ๊ณต์ ..