Day 29

aronson(25)
Published in
#code
Words
127
Reading
1 min
Listen
Play
9y

February 11th 2018

At the ES6 course by Wes Bos I learned about promises. They are used when fetching JSON or Ajax files. It is basically something that will now and between the end of time, so in the future, but probably not immediately.

.then() function will only run when the data comes back

catch()it will catch the error

postsPromise
.then(data => data.json())
.then(data => {console.log(data) })
.catch((err) => {
console.log(err);
})

Or:
p
.then(data => {
console.log(data);
})
.catch(err => {
console.error(err);
})
For now this seems a little difficult for me but I will study them more.

And at the Web Development Bootcamp I finished the Circles page, and used Howles.js to add cool sounds to the circles.

sound: new Howl({
src: ['sounds/zig-zag.mp3']
}),

Cheers!

Day 29 | Ecency