DEV Community

Cover image for Discover the Power of Closures in VueJS

Discover the Power of Closures in VueJS

Fabian Hinsenkamp on April 28, 2019

Originally published on hinsencamp.com Today's frontend technology landscape, required from engineers to know about a wide variety of technologies...
Collapse
 
jamesthomson profile image
James Thomson

Great write up. Closures are an integral building block when learning JavaScript. 👍

Btw, you have 2 very, very minor things that need correction in your code examples

console.log(squareB); // ReferenceError: squareX is not defined.

should be // ReferenceError: squareB is not defined.

and you call hallo(); // B C, but hallo() isn't a function ;)

Collapse
 
hinsencamp profile image
Fabian Hinsenkamp

Thanks James, good catch!

Collapse
 
joshualjohnson profile image
Joshua Johnson

Nice overview! How do you feel closures play a role in ES6?