์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- react
- Python
- heapq
- fe
- mongodb
- ๊ฐ๋ฐ
- ํฌ๋กค๋ง
- ๋ ธ๋ง๋์ฝ๋
- KDT
- JS
- ๊ตญ๋น์ง์
- CSS
- ํ์ด์ฌ
- ์ฝ๋ฉ
- javascript
- ์ฝ๋ฉ์ ํ
- ๋๋ฆผ์ฝ๋ฉ
- ํ๋ก ํธ์๋
- ๋ฐฑ์ค
- HTML
- node.js
- ๊ทธ๋ฆฌ๋
- error
- ํ๋ก์ ํธ
- ํ๋ก๊ทธ๋๋จธ์ค
- Til
- ์ฝ๋ฉํ ์คํธ
- ์๊ณ ๋ฆฌ์ฆ
- ๋ชจ๊ฐ์ฝ
- ํ ์ดํ๋ก์ ํธ
- Today
- Total
๋ชฉ๋กjavascript (9)
๐ฑ → ๐ณ
sudo๋ก ๊ถํ ์ฃผ์ด ์ค์น ๐ NPM ์ด๋? Node Package Manager ํํค์ง ๊ด๋ฆฌ๋ฅผ ์ํด ํ๋์ json ํ์ผ๋ก ๊ด๋ฆฌํด ์ค โ ํจํค์ง ๊ด๋ฆฌ ์์ํ๊ธฐ npm init -y package.js ํ์ผ์ด ์์ฑ๋๊ณ , ์ด ํ์ผ์์ node.js ๊ด๋ จ package ์ ๋ณด๊ฐ ๋ค ๋ค์ด๊ฐ { "name": "day27", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" } ์์ ํ์ผ์ด ์ฒ์ ์์ฑ ๋น์์ package.js์ด๋ค. npm run tes..
๐ ๋ฌธ์์ด ๊ด๋ จ JS ๊ธฐ๋ฅ โ .length(); ๋ฌธ์์ด ๊ธธ์ด โ .indexOf(""); ๋ฌธ์์ด ์์น ์ฐพ๊ธฐ const str = "Hello, world"; console.log(str.indexOf("world")); // 7 โ .slice(start, end); ๋ฌธ์์ด ์๋ฅด๊ธฐ โ .replace("์ฐพ์ ๋ฌธ์", "๋ฐ๊ฟ ๋ฌธ์"); ๋ฌธ์์ด ๋ฐ๊พธ๊ธฐ โ .repeat(๋ฐ๋ณต ํ์); ๋ฌธ์์ด ๋ฐ๋ณตํ๊ธฐ let str = "์ฐ์"; let longStr = str.repeat(5) + "์ฐ"; console.log(longStr); โ .trim(); ์ ๋ค ๊ณต๋ฐฑ ๋ฌธ์ ์ ๊ฑฐํ๊ธฐ let str = " ์ฐ์์ฐ "; let trimStr = str.trim(); console.log(trimStr); //์ฐ์์ฐ ๐ ..
HTML/CSS, JavaScript๋ฅผ ์ฌ์ฉํ์ฌ TodoList ๋ง๋ค์ด๋ณด์๋ค. ๋์์ธ์ ํ์์ ์์ฃผ ์ฌ์ฉํ๋ todomate๋ฅผ ์ฐธ๊ณ ํ๋ค. list๊ฐ ์ ๋ ฅ๋ ํด๋ณด๊ธธ ๋ฐ๋๋ค ! ๋์ค์ ๋ฒก์๋๋ ๋ฐฐ์์ ๋๋ง์ todolist app์ ์์ฑํด๋ด์ผ์ง ๊ฒฐ๊ณผ๋ฌผ: https://lambent-beignet-d6fa26.netlify.app Todolist lambent-beignet-d6fa26.netlify.app ์ฝ๋ ํ์ธ: https://github.com/thals0/TodoList-netlify GitHub - thals0/TodoList-netlify Contribute to thals0/TodoList-netlify development by creating an account on GitHub. gith..
๐ DOM(Document Object Model) ๐ DOM API : Document Object Model Application Programming Interface โ querySelector("์์ ์ ํ์") CSS ์์ ์ ํ์๋ฅผ ์ฌ์ฉํด์ ์์ ์ด ๊ฐ์ ธ์ค๊ณ ์ถ์ดํ๋ ์์๋ฅผ ๊ฐ์ ธ์ค๋ ๋ฉ์๋ ๋ฌธ์์์ ๋ง๋๋ ์ ์ผ ์ฒซ๋ฒ์งธ ์์๋ฅผ ๋ฐํํจ โ getElementById("id") ID ์ด๋ฆ์ ๋ถ๋ฌ์ ํด๋น ID๋ฅผ ๊ฐ์ง๋ ์์๋ฅผ ๋ถ๋ฌ์ค๋ ๋ฉ์๋ โ classList classList.add('class1') : ์ ํ ์์์ class1์ด๋ผ๋ class ๋ํ๊ธฐ classList.remove('class1') : ์ ํ ์์์ class1์ด๋ผ๋ class ์ ๊ฑฐ classList.contains('class1')..
๐ Object ์ ๊ทผ ์ถ๊ฐ ์ญ์ ํ๋กํผํฐ ์กด์ฌ ์ฌ๋ถ ํ์ธ Object method method: ๊ฐ์ฒด property๋ก ํ ๋น ๋ ํจ์ ๐ this function sayHello() { console.log(`Hello, I'm ${this.name}`); console.log(this); } let boy = { name: "Justin", sayHello, }; let girl = { name: "Anna", sayHello, }; boy.sayHello(); //Hello, I'm Justin girl.sayHello(); //Hello, I'm Anna โ ํ์ดํ ํจ์์ this ํ์ดํ ํจ์๋ ์ผ๋ฐ ํจ์์๋ ๋ฌ๋ฆฌ ์์ ๋ง์ this๋ฅผ ๊ฐ์ง์ง ์์ ํ์ดํ ํจ์ ๋ด๋ถ์์ this๋ฅผ ์ฌ์ฉํ๋ฉด, ๊ทธ thi..
๐ ๋ณ์๋ช ๊ธฐ๋ณธ ๊ท์น ๋ณ์ ์ด๋ฆ์ผ๋ก๋ ๋ฌธ์/์ซ์/_/$ ๋ง ์ฌ์ฉ ๊ฐ๋ฅ ์ฒซ ๊ธ์๋ ์ซ์ ๋ถ๊ฐ ์์ฝ์ด ์ฌ์ฉ ๋ถ๊ฐ ์๋ฏธ๋ฅผ ๋ดํฌ ํ๋ ๋ณ์ ์ด๋ฆ์ด ์ข์ ์ ๋จ์ด๊ฐ ๋ช ์ฌ -> ๋ณ์ ์ ๋จ์ด๊ฐ be๋์ฌ -> boolean ์ ๋จ์ด๊ฐ ๋์ฌ -> ํจ์ ์์, ๊ณ ์ ๊ฐ์ ์ ์ฒด ๋๋ฌธ์๋ก ์ ์ธ ๐ ๋ฐ์ดํฐ ํ์ : string, number, boolean, undefined, null, object, array ๋ฑ โ typeof : ํด๋น ์๋ฃ(๋ณ์, ๋ฐ์ดํฐ ๋ฑ)์ ๋ฐ์ดํฐ ํ์ ์ ๋ฐํํด์ค ์ฃผ์, object์์ ์๋ฃ์ null๋ object๋ผ๊ณ ๋ธ console.log(typeof null); console.log(typeof "hi"); console.log(typeof 77); // {} ๋น object ์ ์ธ consol..
๋ฐ๋๋ผJS๋ก ํฌ๋กฌ์ฑ ๋ง๋ค๊ธฐ: From #2.7 to #2.16 All Courses – ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders ์ด๊ธ๋ถํฐ ๊ณ ๊ธ๊น์ง! ๋๊ผฌ์ค๊ณผ ํจ๊ป ํ์คํ์ผ๋ก ์ฑ์ฅํ์ธ์! nomadcoders.co #2.7 Functions argument : function์ ์คํํ๋ ๋์ ์ด๋ค ์ ๋ณด๋ฅผ function์๊ฒ ๋ณด๋ผ ์ ์๋ ๋ฐฉ๋ฒ #2.8 Functions part Two NaN : Not a Number ํจ์๋ฅผ ๋ถ๋ฅด๊ณ , ์ ๋ ฅํ๋ ๊ฒ ๊น์ง ๋ฐฐ์ //object ์์ function์ด ์๋ ๊ฒฝ์ฐ const player = { sayHello: function(otherName){ console.log("Hello " + otherName); } } player.sayHello("nico"); play..
Day 2 - ๋ฐ๋๋ผJS๋ก ํฌ๋กฌ์ฑ ๋ง๋ค๊ธฐ: From #2.1 to #2.6 console.log() : console์ ์ถ๋ ฅ #2.1 Basic Data Types integer: ์ ์ float: ์์ string : ๋ฌธ์์ด #2.2 Variables #2.3 const and let const: ๋ณ์ ์ ์ธ(constant), constant๋ ๊ฐ์ด ๋ฐ๋ ์ ์์ let: ๋ณ์ ์ ์ธ / ๊ฐ ๋ฐ๊ฟ ์ ์์ (์ ๋ฐ์ดํธ ๊ฐ๋ฅ) ๋ง์ ์ฌ๋๋ค์ด const๋ฅผ ๋ณดํต ์ฌ์ฉํ๊ณ , variable์ ์ ๋ฐ์ดํธ ํ๊ณ ์ถ์ผ๋ฉด let์ ์ฌ์ฉํจ var ์ธ์ด ๋ณดํธ ๋ถ๊ฐ๋ฅ/ ์ฝ๋์ ์๋๋ฅผ ํ์ ํ๊ธฐ ํ๋ค์ด์ง -> ์๋ ๊บผ๋๊น ๋๋๋ก ์ฐ์ง๋ง ๊ฒ #2.4 Booleans null: ์๋ฌด๊ฒ๋ ์์์ ์๋ฏธ undefined: ๋ณ์๋ ์กด์ฌํ์ง๋ง..