DEV Community

loading...

Discussion on: Functional Programming in JavaScript? Yes, Please.

Collapse
haraldkampen profile image
Harald Kampen

Please, use namespaces:

const MyNamespace = {};

MyNamespace.isCat = function(animal){
return animal.species === 'cat';
});

Collapse
joelnet profile image
JavaScript Joel

There are better ways to organize code than namespaces. With ES6 modules and webpack (recommended), namespaces are unnecessary.