export default data;
let data=[
{
id : 0,
title : "White and Black",
content : "Born in France",
price : 120000
},
{
id : 1,
title : "Red Knit",
content : "Born in Seoul",
price : 110000
},
{
id : 2,
title : "Grey Yordan",
content : "Born in the States",
price : 130000
}
] ;
data.js에 export 위치를 맨 위에다 쓰면
Uncaught ReferenceError: Cannot access 'data' before initialization
이런 에러가 나는데 export는 꼭 object 밑에 써야하는 걸까요?