JavaScript - 데이터 타입(원시 자료형)
·
개발새발개발/JavaScript
데이터 타입 1. 원시 자료형(Primitive type)  Number, String, Boolean, null, undefined  변수에 값이 직접 저장되는 자료형  변수에 할당될 때 값이 복사됨  변수간에 서로 영향을 미치지 않음  const a = 'bar' console.log(a) // bar a.toUpperCase() console.log(a) // bar let a = 10 let b = a b = 20 console.log(a) // 10 console.log(b) // 20   2. 참조 자료형 (Reference type)    Objects(object,Array,Function)  객체의 주소가 저장되는 자료형(가변, 주소가 복..