map() – JavaScript magic

map() – JavaScript magic

JavaScript provides us with a very helpful map method to work with arrays. It can be used to in scenarios where you want to perform an action on each of the elements of an array.

Resolve

Resolve

‘Resolve’ comes to our rescue when we want to fetch some data or check some condition before loading the view. Resolve is a list of tasks that should be done before the controller instantiates or the view is loaded.