DEV Community

loading...

Discussion on: Some Closure on Closures

Collapse
cristiancota profile image
Cristian Cota

That's quite good explanation, thanks!

In the database example, you put:

const db1Connect = Connect(db1URI);
const db2Connect = Connect(db1URI);
const db3Connect = Connect(db1URI);

You may want to change it to:

const db1Connect = Connect(db1URI);
const db2Connect = Connect(db2URI);
const db3Connect = Connect(db3URI);
Collapse
jckuhl profile image