3 ms·
Here is an example where callbacks are even less intuitive: if not song.artist @getArtist song.id, (err, artist) => song.artist = artist @sav
by jeswin 13y ago
Here is an example where callbacks are even less intuitive:
if not song.artist
@getArtist song.id, (err, artist) =>
song.artist = artist
@save song
@addToCatalog song
#...
else
@save song
@addToCatalog song
#...
Callbacks will force you to move @save, @addCatalog, ... into a separate function. Completely messing up the logical sequence of operations.