New to Promises in serverside (Node js). Here is my question
I have code in FileA.js
incoming_form = client_services.pullForm('vsl_video1.mp4');
incoming_form.resolve().then(function(results) {
return console.log(results);
});
The incoming_form returns a Promise something like this in FileB.js
incoming_form () {
return Promise (function (resp, rej) {
var myArray = ['fudge', 'fgfdgdf'];
return resp(myArray);
});
}
How can I read my 'myArray' value in FileA.js? when I ran my FileA.js, I am getting this error
TypeError: incoming_form.resolve is not a function
" when I do incoming_form.resolve().then(function(results) { return console.log(results); }); – JBone Apr 05 '16 at 13:36