JavaScript

Why compose() is right-to-left

Published on in JavaScript

Functions composed together with compose() are called from right to left. It feels unintuitive at first, but it's conventional and kind of makes sense.

"Illegal invocation" errors in JavaScript

Published on in JavaScript

Last updated on

JavaScript throws an "Illegal invocation" error when the context of a function is lost, i.e. when the function's this keyword isn't referring to where it should.