I've read a lot of documentation on the let
keyword in JavaScript, and I understand that the spec is still being revised and updated, but I've come across a usage of let
which I have yet to see, and I was curious how this syntax works.
For context, it appears in nervgh/angular-file-upload, and this is the syntax usage I cannot understand:
let { forEach } = angular;
I see later in the code that forEach
is used like so:
forEach(this.uploader._directives.over, this._removeOverClass, this);
It almost appears to be used as a namespace assignment.