내장함수 3
1. concat concat은 두 배열을 합치고, 기존의 배열은 건드리지 않습니다. const arr1 = [1, 2, 3] const arr2 = [4, 5, 6] const concated = arr1.concat(arr2); console.log('concated: ', concated); console.log('arr1: ', arr1); console.log('arr2: ', arr2); 2. join join은 배열 안에 있는 원소를 문자열로 합쳐주는 기능을 합니다. join 함수의 파라미터는 문자열 사이에 배치됩니다. const array = [1, 2, 3, 4, 5] console.log('join: ', array.join()); console.log('join parameter: '..
내장함수 2
1. filter filter는 특정 조건을 만족하는 원소를 찾아서 반환하는 역할을 합니다. const blood_type = [ { id: 1, type: 'A', donation: true, }, { id: 2, text: 'B', donation: true, }, { id: 3, text: 'AB', donation: true, }, { id: 4, text: 'O', donation: false, } ] const need_donation = blood_type.filter(blood => blood.donation); console.log(need_donation); const need_donation = blood_type.filter(blood => blood.type === 'B'); co..