Example Promise code from Douglas Crockford's JavaScript Lectures.