In looking at JavaScript from various Firefox extensions, I've seen code like the following for creating aliases (example):
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;
This makes sense to me. However, I've seen a strange looking variant of this code that looks like this (from this example):
let { classes: Cc, interfaces: Ci, utils: Cu } = Components;
I don't fully understand this assignment statement. I believe that the end result is essentially the same as the former code block, but why? An anonymous object is being assigned the value Components, correct? I've never seen an assignment type like this before, so it makes little sense to me.
I looked at the Values, variables, and literals page at MDN, and the documentation for let, but neither page had any examples of this type of construction.