Notice
Recent Posts
Recent Comments
Link
목록Prototype (1)
솔미는 성장중
[JS] prototype + 배열 만드는 방법
colors.test() 배열 만드는 방법 1. 리터럴 방식으로 배열 만들기 const colors = ['Red', 'Green', 'Yellow', 'Blue'] 2. 생성자 함수 형식으로 배열 만들기 (new사용) const colors = new Array('Red', 'Green', 'Yellow', 'Blue') console.log(colors) //(4) ['Red', 'Green', 'Yellow', 'Blue'] //0: "Red" //1: "Green" //2: "Yellow" //3: "Blue" console.log(colors.includes('Green')) //true console.log(colors.length) //4 여기서 length, includes를 prototy..
JavaScript
2023. 7. 19. 00:06