DEV Community

Discussion on: June 17th, 2021: What did you learn this week?

Collapse
 
kirkcodes profile image
Kirk Shillingford

A bit late, but I spent a bit of time getting more familiar with the javascript languages properties. Reviewing the behaviour of 'this' and scope, and also made the wonderful discovery of syntactic sugar for nested functions, and by extension, partial functions.

// instead of
const f = (x) =>
    const g = (y) =>
        x + y
// we can just write 

const f = x => y => x + y
Enter fullscreen mode Exit fullscreen mode

Had not seen the latter syntax before yesterday.

Collapse
 
nickytonline profile image
Nick Taylor

Hot Rod saying Cool beans!