¡@

Home 

javascript Programming Glossary: getstufffromdatabase

Understanding Asynchronous Code in Layman's terms

http://stackoverflow.com/questions/11233633/understanding-asynchronous-code-in-laymans-terms

a long time fetching some data from the database. function getStuffFromDatabase this takes a long time Since we don't want it to run synchronously.. we'll allow the user to pass in a callback. function getStuffFromDatabase callback this takes a long time We'll simulate taking a long.. database but we'll just hardcode a string value. function getStuffFromDatabase callback setTimeout function var results database data 5000..