λ°°μ΄μ λ§λ€μλ€.
const goodcoders = ['noran', 'paran', 'black','white'];
const badcoders = ['green', 'blue'];
splice : μνλ μμμμ μνλ λ§νΌ μμ νκΈ°/κ·Έ μ리μ μΆκ°νκΈ°
goodcoders.splice(2, 1); //(μνλ μμλΆν° μμ,μ§μ°κ³ μνλ κ°μ)
console.log(goodcoders);
//'noran', 'paran', 'white'
goodcoders.splice(2, 1, 'yellow', 'purple'); //(μνλ μμλΆν° μμ,μ§μ°κ³ μνλ κ°μ, μΆκ°ν λ°μ΄ν°)
console.log(goodcoders);
//'noran', 'paran', 'yellow', 'purple', 'white'
concat : λ λ°°μ΄μ ν©μΉκΈ°
const codingteam = goodcoders.concat(badcoders);
console.log(codingteam);
//'noran', 'paran', 'black','white', 'green', 'blue'
μΆμ² : λλ¦Όμ½λ© https://www.youtube.com/@dream-coding / MDN https://developer.mozilla.org/ko