Simplifying function expressions and the function statement in JavaScript

Read full article on the Infragistics blog In JavaScript, a function can be created in three possible ways: Function as an expression Function as a statement Arrow functions In this post, we will learn about function expressions and the function statement. Consider the following code: https://gist.github.com/debugmodedotnet/e4b1dc967bc51b6c8dd1ff98d8d88dc6 When you create a function as shown above, itContinueContinue reading “Simplifying function expressions and the function statement in JavaScript”

What are the Call and Apply Methods in JavaScript

Read full article on the Infragistics blog In JavaScript, the apply() and call() methods execute a function in the context (scope) of the first argument you pass to them. Let’s take a look at them in action to learn more. Say that you have an object person as shown below: https://gist.github.com/debugmodedotnet/11ca4e8d58e602ca93813cef93d9601e And in addition, you have aContinueContinue reading “What are the Call and Apply Methods in JavaScript”

Four Ways to Create Objects in JavaScript

In JavaScript, there are four methods to use to create an object: Object literals New operator or constructor Object.create method Class In this post, we will learn each of these methods. Object literals An object literal, also called an object initializer, is a comma-separated set of paired names and values. You can create an objectContinueContinue reading “Four Ways to Create Objects in JavaScript”

What are Template Literals in JavaScript

Read full article on the Infragistics blog In ES6, two types of literals were introduced: Template Literals for string concatenation and expression embedding in a string Tagged Template Literals to tag the Template Literal in a function so the literal can be evaluated in the function Let’s assume that you need to do the stringContinueContinue reading “What are Template Literals in JavaScript”

How to Create Your First Angular Reactive Form

Read full article on the Infragistics blog Out of the box, Angular provides us with two types of forms: Template Driven Forms Reactive Forms In Template Driven Forms, you create controls on the component template and bind data using ngModel. With these, you do not create controls, form objects, or write code to work withContinueContinue reading “How to Create Your First Angular Reactive Form”

geek97 hosted Angular workshop for girls students

I am very pleased to share that on 16 November 2017, geek97 hosted a free workshop on Angular for Girls Students of Indira Gandhi Delhi technical University for Women, Delhi. The workshop was attended by around 40 energetic and super talented girls from Computer Science Engineering and MCA department. Every student were writing codes andContinueContinue reading “geek97 hosted Angular workshop for girls students”

Simplifying function expressions and the function statement

Read full article on the Infragistics blog In JavaScript, a function can be created in three possible ways: Function as an expression Function as a statement Arrow functions In this post, we will learn about function expressions and the function statement. Consider the following code: https://gist.github.com/debugmodedotnet/f7f9c0a6e18a62521ad5fd6656adb69e When you create a function as shown above, itContinueContinue reading “Simplifying function expressions and the function statement”

What are getters and setters in JavaScript

In JavaScript, you may have heard of getters and setters. Let’s take a look at what these things are.First, a setter is used to set the value of a property. A setter gets called each time the value of the property is changed. In other words, it executes a function for each time a propertyContinueContinue reading “What are getters and setters in JavaScript”

JavaScript Object Property Descriptors

In JavaScript, you can create an object literal as shown in the listing below:At first sight, it looks like the object cat has two properties with a string and number value. However, it’s much more than that to a JavaScript interpreter. In ES5, the concept of a Property Descriptor was introduced. Before we go aheadContinueContinue reading “JavaScript Object Property Descriptors”

Arrow functions in JavaScript

The JavaScript arrow function is a shorter way of writing a function expression that was introduced in ECMAScript 6. Usually in JavaScript, you can create a function in two ways:Function as statement Function as expressionA function statement can be created as shown below:The same function can be created as a function expression as shown below:ECMAContinueContinue reading “Arrow functions in JavaScript”