pass by value1 [JS]Pass By Value(primitives) VS Pass By Reference(objects) 👉 자바스크립트에서 값, 객체 복사/전달시 주의해야하는 점 Pass By Value(primitives) VS Pass By Reference(objects) 제목에 답이 있다. 먼저 JavaScript의 primitives 값(기본값)을 정확히 알고 있어야 하는데 이는 undefined, null, boolean, string and numbers로 총 6가지이다. 이와 같은 값을 전달할 때는 예시로 Anthony Alicea — Udemy.com let a = 5 let b = a console.log(a) // => 5 console.log(b) // => 5 a = 1 console.log(a) // => 1 console.log(b) // => 5 b에 a를 할당하면 새로운 메모리 주소에 a 값.. 2023. 3. 24. 이전 1 다음