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, it … Continue reading Simplifying function expressions and the function statement in JavaScript

Advertisements

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 a … Continue reading What are the Call and Apply Methods in JavaScript

What are @HostBinding() and @HostListener() in Angular?

Read full article on the Infragistics blog To understand @HostListener and @HostBinding, you should have basic knowledge about directives in Angular. There are three types of directives in Angular: Component Attribute Directive Structural Directive The basic difference between a component and a directive is that a component has a template, whereas an attribute or structural … Continue reading What are @HostBinding() and @HostListener() in Angular?