Node.js : Call function using value from callback or async
问题 I have written below .js file to call below defined function. objectRepositoryLoader.readObjectRepository() returns me a hashmap from where i have to use values in enterUserName(), enterPassword(), clickLoginButton() functions. var path = require('path'); var elementRepoMap = {} var LandingPage = function(){ var fileName = path.basename(module.filename, path.extname(module.filename)) objectRepositoryLoader.readObjectRepository(fileName+'.xml' , function(elementRepo){ console.log(elementRepo)