Explore APPLY, CALL and BIND methods in JavaScript

When you research something on the internet related to JavaScript, you might see apply, call and bind methods. Sometimes you get confusing of them about the purpose and how to use them. They are useful in many case of situations. For instance, you may need to use bind methods to…

How to replace an item in a JavaScript array

We may face this situation a lot in javascript development. So the below is the simply solution to replace an item in an array with splice() method. // replace France to Italia var countries = ['USA', 'France', 'England']; countries.splice(1, 1, 'Italia'); console.log(countries); // ["USA", "Italia"…

Understand and manipulate JavaScript array

As you know, JavaScript is used quite a lot in web developer especially for front-end modern web developer and not except me. I've known JavaScript for many years ago but recently I've focused on it. It's easy to use but if you want to master it you have understand deeply…

Create a custom directive in AngularJS

What are directives? If you are learning about AngularJS, you need to know what is directive and why it is important. So what is directive? You can see ng-app, ng-controller and so on that are directives build in of AngularJS. In some special case we need to create a custom…

Getting started with AngularJS

You may hear about AngularJS but you still have no idea with it. In this post I will show you what is it and why you should know it. What is AngularJS? AngularJS is a two-way binding javascript framework. So what is two-way binding, you can try your self by…