NOTHING IS A WASTE OF TIME IF WE USE THE EXPERIENCE WISELY

Closure in JavaScript

Closure: A closure is a feature in JavaScript where an inner function has access to the outer (enclosing) function’s variables. Whenever a function is called, a new scope is created for that call. The local variable declared inside the function belongs to that scope; they can only be accessed from that function. Example: function add(n)

  Expressions and statements are the bread and butter of a program’s code structure. In this blog I try to explain the concept of expressions and statements. Expressions are fragments of code that produces a new value as a result. For example it is similar to arithmetical operation. By arithmetical operations we can do addition

Defining Class in JavaScript JavaScript  is very flexible object-oriented language in case of syntax. In object- oriented programming the concept that comes to our mind with object is ‘Class’. But the interesting fact about JavaScript is that there are no classes in JavaScript. Everything is a object. In case of inheritance, objects inherit from objects,

Map() method: This method is used when you need to do some type of transform on every element. The map method will applying a function to all of its elements in the array and creates a new array. Example, var persons = [ { id: 1, name: ‘Kamal’, salary: 2000 }, { id: 2, name:

Higher Order Function Before Higher order function we have to know about function. So let us introduce a function. What is a function? A function is a block of code that can solve a particular task and give result. A function must have a name and body. And also can have argument if needed by

Prototypes in JavaScript

Prototype- In JavaScript , every objects have an internal property which is called Prototype. To understand this we will go through an example- Watch closely! We have created an object of Customer. It has property value FirstName & LastName. Customer has no property named toString().Then how Customer.toString() returns a value? Here comes the idea of

TOP