Notice
Recent Posts
Recent Comments
Link
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- https://m.blog.naver.com/tt2t2am1118/221010125300
- slow and steady
- ๊ฒ์
- json
- Project
- db
- ajax
- database
- ํผํ
- object
- async
- promise
- js
- Import
- webpack
- JS #ํ๋ก์ ํธ
- ๋น๋๊ธฐ
- ์ฐธ๊ณ ๋ธ๋ก๊ทธ
- eport
- sql
- https://youtube.com/playlist?list=PLuHgQVnccGMA5836CvWfieEQy0T0ov6Jh&si=FTaYv8m21EhO-A2K
- setTimeout()
- callback
- prj
- Porject
- addEventListener
- await
- mysql
- execCommand
- ๋๊ธฐ
Archives
- Today
- Total
C-log
JS์ ํต์ฌ! Array ๋ฐฐ์ด ๋ณธ๋ฌธ
728x90
YouTube Link |
|
์๋ฐ์คํฌ๋ฆฝํธ 8. ๋ฐฐ์ด ์ ๋๋ก ์๊ณ ์ฐ์. ์๋ฐ์คํฌ๋ฆฝํธ ๋ฐฐ์ด ๊ฐ๋ ๊ณผ APIs ์ด์ ๋ฆฌ | ํ๋ก ํธ์๋ ๊ฐ๋ฐ์ ์ ๋ฌธํธ (JavaScript ES6 ) | |
https://youtu.be/yOdAVDuHUKQ |
์ค๋ธ์ ํธ์ ๋ฐฐ์ด์ ์ฐจ์ด๋ ๋ฌด์์ธ๊ฐ. ์ค๋ธ์ ํธ๋ ์๋ก ์ฐ๊ด๋ ๊ฒ๋ค์ ๋ฌถ์ด ๋๋ ๊ฒ์ ๋งํ๋ค. ์ด๋ฌํ ๋น์ทํ ํ์ ์ ๋ฌถ์ด๋์ ๊ฒ์ ์๋ฃ๊ตฌ์กฐ๋ผ๊ณ ํ๋ค. ์๋ฃ๊ตฌ์กฐ๋ ๋์ผํ ํ์ ๋ง ๋ด์ ์ ์๋ค.
unshift() & shift()
//unshift : add an item to the beginning
console.log('unshift');
console.log(fruits);//Before
fruits.unshift('lemon', 'strawberry')
console.log(fruits);//After
//shift : remove an item from the beginning
console.log('shift')
console.log(fruits);//Before
fruits.shift();
fruits.shift();
console.log(fruits);//After
console.log();
splice()
//splice: remove an item by index position
console.clear();
console.log('splice 1');
console.log(fruits);//Before
fruits.push('strawberry', 'peach', 'orange');
console.log(fruits);//After
console.log('splice 2');
fruits.splice(1);//์ง์ ๋ถ๋ถ ๊น์ง ์ ๊ฑฐ
fruits.push('banana', 'strawberry', 'peach', 'orange');
console.log(fruits);//Before
fruits.splice(1, 3);// ์ง์ ๋ฒ์ ๋ถ๋ถ ๊น์ง ์ ๊ฑฐ
console.log(fruits);//After
console.log('splice 3');
fruits.splice(1);
fruits.push('banana', 'strawberry', 'peach', 'orange');
console.log(fruits);
fruits.splice(1, 3, 'lemon', 'grapes');//์ง์ ํ ํด๋น ๋ฐฐ์ด์ ์ ๊ฑฐํ ํ ์ถ๊ฐ ๋ ๊ฐ
console.log(fruits);
contact()
//contact : combine to arrays
console.clear();
console.log('contact'); console.log(fruits);
const fruits2 = ['avocado', 'coconut']
console.log(fruits2);
const newFruits = fruits.concat(fruits2);
console.log(newFruits);
indexOf()&includes()&lastIndexOf()
//indexOf&includes&lastIndexOf : find the index
console.clear();
console.log(fruits);
console.log('indexOf');
console.log(fruits.indexOf('grapes'));
console.log(fruits.indexOf('apple'));
console.log(fruits.indexOf('avocado'));
console.log('includes');
console.log(fruits.includes('grapes'));
console.log(fruits.includes('apple'));
console.log(fruits.includes('avocado'));
console.log('lastIndexOf');
fruits.push('apple');
console.log(fruits);
console.log(fruits.indexOf('apple'));
console.log(fruits.lastIndexOf('apple'));
YouTube Link |
|
์๋ฐ์คํฌ๋ฆฝํธ 9. ์ ์ฉํ 10๊ฐ์ง ๋ฐฐ์ด ํจ์๋ค. Array APIs ์ด์ ๋ฆฌ | ํ๋ก ํธ์๋ ๊ฐ๋ฐ์ ์ ๋ฌธํธ ( JavaScript ES6) | |
https://youtu.be/3CUjtKJ7PJg | |
์๋ฐ์คํฌ๋ฆฝํธ 7. ์ค๋ธ์ ํธ ๋ ๋ญ๋? | ํ๋ก ํธ์๋ ๊ฐ๋ฐ์ ์ ๋ฌธํธ (JavaScript ES6) | |
https://youtu.be/1Lbr29tzAA8 |
์ค๋ธ์ ํธ ๊ฐ์
ํ๋กํ (proto)
728x90
'๐JS > โกver.1' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
JS์ ํต์ฌ! ํ๋กํ ํ์ prototype (0) | 2023.05.16 |
---|---|
JS์ ํต์ฌ! Object ์ค๋ธ์ ํธ (0) | 2023.05.16 |
JS์ ํต์ฌ! ์ฝ๋ฐฑ ํจ์ (0) | 2023.05.10 |
JS์ ํต์ฌ! ๋ฐฐ์ด ๊ด๋ จ ํจ์ (0) | 2023.05.10 |
JS์ ํต์ฌ! : JSON (0) | 2023.05.08 |
Comments