Getting below error when i try to use async/await with NodeJs 4.x. Any issue with the below sample code or should i use alternate ?
async function main ()
try installing asyncawait. It should work for older node versions. Other alternatives are using a callback or promises.
you'll have to require it
npm install asyncawait
require modules.
var async = require('asyncawait/async');
var await = require('asyncawait/await');
perform operations.
(async function () {
const intgetIDvalue = await fntest(getID);
})();