Day-11 Problem Solving + Array.concat()

So Eun Ahn·2021년 1월 12일
0

JavaScript

목록 보기
15/26
post-thumbnail

Problem Solving
1) Understand the problem
2) Breaking up into sub problems

Array.concat()
두개의 다른 Array를 기존 배열에 합쳐서 새 배열을 return한다.
일명 두개의 다른 배열을 하나의 배열로 새로 합치는거라고 이해하면 쉬울꺼 같다.

const array1 = ['a', 'b', 'c'];
const array2 = ['d', 'e', 'f'];
const array3 = array1.concat(array2);

console.log(array3);
// expected output: Array ["a", "b", "c", "d", "e", "f"]

오늘 퇴근후에 피티끝나고 할것 Array/function/for loop/ while loop/ if 구문 예시 문제들 찾아서 혼자 풀어볼것 !!

profile
오늘도 새로운 도전을 한다

0개의 댓글