MarcoWorms/learn.js

Add section on `this` in order to explain the `new` used in Promise section

Closed this issue · 4 comments

Title is self explanatory, that part of the guide bothers me because I tried to only use concepts that were already previously presented but new just comes out of nowhere to punch people in the face on this example :(

let p = new Promise(resolve => {
  resolve(2)
})

this section might look like it's only about a bad part but I could use it to introduce partial application using .bind which is pretty cool

hey, i know you closed my issue, but just wanted to mention that my PR for classes mentioned the this and new operator.

Thanks @dewball345 I was starting to write this part I'll take a look into it!!

Its not fully completed but has most of it