UI Deploy

Curated, Short, Web UI Dev we Love.

Composing Synchronous and Asynchronous Functions in JavaScript

Our example application implements a function createEmployee that is used to create an employee from a personId.

To create an employee, our system loads some data from our database, validates that data, and then performs an insert. Some of our functions are written in continuation-passing style (they accept a callback) and some are written in a direct style (they return values and/or throw exceptions).

view source

Advertisement