Please tell us how the function exported by js export refers to undefined as return.

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

.
Mar.11,2022

getInitTime (). NowTime

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2289c-2ab6d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2289c-2ab6d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?