제목1 제목2 제목3 제목4 blue라는 클래스 이름을 가진 값들을 getElementsByClassName로 가져와서 blues로 변수 선언하고, foreach를 돌리면, 아래와 같은 오류가 발생한다. blues.foreach is not a function 왜일까?!!! 안되는 이유를 알아보기 위해! console.log(blues)를 찍어본다. getElementsByClassName 가져온 값은 prototype이 HTMLCollection이다. keypoint! foreach는 array 배열만 사용 가능하다. 위의 올바르게 수행되게 하기 위해서는 아래와 같이 작성하면 된다! 1. blues를 배열로 변경 2.getElementsByClassName 대신 querySelectorAll 사용 qu..