ํจ์ ์์์ ์ ์ธ๋ ๋ณ์๋ฅผ ๊ฐ์ง๊ณ ์ค๊ณ ์ถ์ต๋๋ค.
const markers = []; function getMarker(position) { // ๋ง์ปค๋ฅผ ์์ฑํฉ๋๋ค const marker = new kakao.maps.Marker({ position: position }); return marker; } const newMarker = getMarker(position) markers.push(newMarker): ํจ์์์์ makers ๋ฐฐ์ด์ pushํ๋ ๊ฒ์ด ์๋๋ผ ํจ์ ํธ์ถ ํ ํจ์ ๋ฐ์์ pushํ๋ฉด ๋์ง์์๊น์?