When i am trying to export a varibles like this
const test1 = [
{numbder:'one', name:'user',tag: 'test'}
]
const test2 = [
{numbder:'one', name:'user',tag: 'test'}
]
module.exports = { test1, test2 }
and i import it like this
const test = require('./test.js')
myfunction function () {
console.log(test1 +'and'+ test2)
}
I get this error :
ReferenceError: Cannot access 'test1' before initialization
could anyone explaine to me what is the problem?