Tuesday 10 January 2017

How do you run the same function with different inputs using Promises?

I was in Callback Hell. I created a function to parse xml files by popping a file name out of the array and processing it and if there are more files, call the function again. Now I have been making my script use Promises to get out of Callback Hell but I don't know how to string together calls to the same function with different inputs. Any suggestions? Thanks in advance!

Submitted January 11, 2017 at 02:15AM by DTheDeveloper

No comments:

Post a Comment