function siblings(tagArray) {
const tempArr = [];
for (const element of tagArray) {
tempArr.push(element);
}
return tempArr.filter((tag) => tag.classList.contains('on'))
}
'JavaScript' 카테고리의 다른 글
6자리,7자리 체크 정규식 (0) | 2023.05.19 |
---|---|
템플릿 리터럴(빽틱) (0) | 2022.12.28 |
특정범위에서 클래스 찾기 (0) | 2022.12.09 |
[iframe] 자식창에서 부모창으로 데이터 넘기기 (0) | 2022.11.08 |
[JSON] 에 대하여, (0) | 2022.10.07 |