I was reading a MDN docs about firefox addons and I saw some syntax I didn't understand.
In one of the examples they say:
var { ToggleButton } = require('sdk/ui/button/toggle');
var panels = require("sdk/panel");
var self = require("sdk/self");
var button = ToggleButton({
...
});
Why is the variable name inside the braces: var { ToggleButton } =
?
What is happening here?