related codes
// index1.js
export function getInitTime() {
const nowTime = new Date();
const nowTimeStamp = new Date().getTime();
return {
nowTime,
nowTimeStamp
}
}
// index2.js
import { getInitTime } from "./index1";
console.log(getInitTime); //
console.log(getInitTime.nowTime); //undefined
what result do you expect? What is the error message actually seen?
I hope I can get the value of import
. Thank you