Function called myClosure(): Probably the Simplest Way To Learn It

Don’t worry, closures is not a complex concept to learn if you break it down into small parts as I’m doing here. What I usually do to keep things in my mind for good is to sketch up a mind map. Yep, a mind map like this one above that has the central subject in the middle and several branches off it. Each branch is a small part of the central subject and this drawing you see is similar to how our brain store information, therefore, it’s a great way to study things.

After this small introduction to mind maps, let’s start with this interesting subject: closures.

First of all, what’s a closure?

Continue reading

A few tips on how to work better with Arrays in JS

If you’re like me who always end up using for loop to do any operation involving arrays, you should probably have a look below at some “hidden” methods available in ECMAScript5 (the current version on Javascript) to work with Arrays.I say “hidden” because these functions I’m going to show you are available for a while in most of the browsers but most of the people haven’t heard about them or haven’t used them yet.Below are some functions ordered by how frequent I’m likely to use them. Continue reading

Javascript ES6: Learn important features in a few minutes

The next-generation of javascript also known as ECMAScript 6 (also called ES6 or Harmony), is bringing us lots of amazing features that you probably will need to know. But instead of you spend too much time learning and researching all of the features I separated a few that I felt are the ones you’ll be probably using in your daily basis.

Don’t worry if you are new to javascript or you’re coming from a server-side language, I believe this is the best time to learn it as ES6 has a much cleaner and friendlier syntax, known as sugar syntax.

Continue reading

© 2020 FrontEnd Masters