Skip to content
Advertisement

Tag: callback

resolve and reject issue using node js

Is this possible way to return resolve or reject message from one function to another? As I am writing to pass resolve message in postman whenever my task is completed or reject message when there is some error But after after writing return it still not returning the resolve message or reject message inside Postman any idea how this can

Running a query inside the same connection in nodejs

There is a need to run the second sql query (query2) after building it using results of first query (query1) in mentioned space in code snippet, this second sql query will be generated according to the results of first query. but when I tried to run this, it builds the second query without any issue, but it is not executing.

How to display array in Callback Function

I still confuse about callback function. I have a task to displays month using callback function, so I try to call my function getMonth for displays month and this is so far I got. I haven’t used Javascript before, so any help would be appreciated my output is: Answer You are assigning a function to setTimeout instead of puting the

Not able to return authResponse from auth0-js

I’m trying to implement an login mechanize and not able to return a value from the callback function. I’m using this npm package: auth0-js. There’s two files in my setup. The first one is authService.js where I have my login logic: The second one: index.js I tried returning the value from the callback, as well as assigning the result to

javascript module pattern from You don’t know JS

I have been reading and testing below code out for several hours now and I just can’t seem to grasp certain things. I have been stepping through chrome console basically putting break in every line I can add and have been inspecting and I am just not sure of things 1)I am just not sure of the purpose of deps

Aren’t promises just callbacks?

I’ve been developing JavaScript for a few years and I don’t understand the fuss about promises at all. It seems like all I do is change: Which I could use a library like async for anyway, with something like: Which is more code and less readable. I didn’t gain anything here, it’s not suddenly magically ‘flat’ either. Not to mention

Advertisement