2 ms·
Scoping. Would you like to type this? var myModule = (function(root){ var lib = {}; root.lib = lib; return lib; }(this)); Or
by wyuenho 14y ago
Scoping.
Would you like to type this?
var myModule = (function(root){
var lib = {};
root.lib = lib;
return lib;
}(this));
Or this?
module myModule = {
export //blah blah blah
}
Data structures.
There's not map or set in JS even to this day that actually acts like a map or set you've learned in your data structure class. Object literal is a poor substitution for a map.