promise.js

example for promise object and using XMLHttpRequest