DEV Community

Discussion on: Let's optimize JavaScript - password generator (2.15x faster)

Collapse
 
lukeshiru profile image
Luke Shiru • Edited

My main reason is mainly usage:

import { Something } from "./Something";

console.log(Something.aValue);

// vs

import { aValue } from "./Something";

console.log(aValue);
Enter fullscreen mode Exit fullscreen mode

Super niche, I know, but the kind of encapsulation that used to be useful from classes now I get from modules :D

Thread Thread
 
nombrekeff profile image
Keff

Ahh okay, makes sense