관리 메뉴

Jerry

[#1]TIL_230115 본문

자기 성찰/TIL

[#1]TIL_230115

juicyjerry 2023. 1. 15. 20:07
반응형

1. Set 생성자는 타입에 상관없이 오직 하나의 값만 저장하는 Set 객체

const my_string = "abc";
const setExample = new Set(my_string);
console.log(setExample); 
console.log(...setExample);
console.log([...setExample]);

 

예시)

 

[출처] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/Set

 

 

 

 

 

 

 

 

2. Array.from() 메소드는 유사 배열 객체나 반복 가능 객체를 얕은 복사하여 새로운 Array 객체를 만듬

console.log(Array.from('foo'));
console.log(Array.from([1, 2, 3], x => x + x));

 

 

[출처] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from

 

 

 

 

3. 정규 표현식

[출처] https://wormwlrm.github.io/2020/07/19/Regular-Expressions-Tutorial.html

 

 

 

 

4. [css] Grid 실습

반응형

'자기 성찰 > TIL' 카테고리의 다른 글

TIL_ 오늘 공부한 내용_#6  (0) 2022.01.09
TIL_ 오늘 공부한 내용_#5  (0) 2022.01.07
TIL_ 오늘 공부한 내용_#4  (0) 2022.01.06
TIL_ 오늘 공부한 내용_#3  (0) 2022.01.06
TIL_ 오늘 공부한 내용_#2  (0) 2022.01.05