How can i retrieve a return data in another file js?
this is my user.js looks like
export default function getUser() {
const data = localStorage.getItem("user-account")
//console.log(data.user.ID)
const user = {
ID: data.user.ID,
Name: data.user.Name,
}
return user;
}
and i want to import them and get the return user in another file js, because i want to use this file as global function any solution?