EDDYMENS

Published 10 months ago

SyntaxError: Unexpected Token 'export'| Javascript Error

I am assuming you got this error message whiles working with NodeJS, because this is where mine came from :).

I got this error because I typed out export instead of exports which is what it should be if you are trying to expose some functions, and or variables in a NodeJS script.

retirement.js

01: module.exports = { investedIncomeBucket, inflationRate, investedIncome};

Here is another article you might like 😊 How To Convert A String To A Byte Slice In Golang