How to explain callbacks in plain English? How are they different from calling one function from another function taking some context from the calling function? How can their power be explained to a novice programmer?
@tholo your logging before calling the callback. so the log happens, then the callback is ran, and thus the callback log happens. i'm not sure what part of that you're stuck on
function foo () { console.log('foo');}
function bar () { console.log('bar');}
foo(); // foo
bar(); // bar
function stuff (a, b) {a(); b();}
stuff(foo, bar); // foo bar
a and b in that example are the same as your callback parameter. you passed in a function, and then called it at some point in time.
Hey guys, can anyone help with this?gulp [11:38:15] Using gulpfile ~/Sites/clients/**/gulpfile.js [11:38:15] Starting 'default'... [11:38:15] Starting 'phpcs'... [11:38:15] Finished 'default' after 14 ms
question: for my personal project (an Asp.net CORE Rest api) I am securing with Basic Auth and I plan to have an https certificate, it is only for receiving generic data from the azure db. Any other security measures that I need to consider? (oh also Azure CORS domain entries are required)..
@AkashBose Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
I have a problem with long polling, as i am using long polling for my chat application, but if the users open multiple tabs then the my long polling request will send more than one request to server I think which is a bad idea. So my question is can i rely on local storage's storage event?
Hmm, could this be it? The async block that contains the call to the function ends before the hash function itself finishes its async block
I put some extra console logs in the hash function to know what step it was at, and it seems to end up starting hashing after the block that called the function goes to its own callback
Hopefully easy question. Is there anything client side I need to add to the code to make a CORS preflight check work? I have a URL that testing in postman with 'OPTIONS' works just fine. But the browser always returns 0 for the 'OPTIONS' check, I did verify by tailing the NGINX logs that it is actually returning a 200
@JonHeckman Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.