Posts

Showing posts from April, 2019

Getting started with GIT – Part 2

Image
Welcome to the part 2 of tutorial getting started with git. In the part one we had a one text file in our project. So, let’s create some new files. Now enter the status command. You can see it says that you have untracked files. Here, untracked means we did not commit them, and git does not keep track on changes done to those files. So, in order git to keep track of our files we need to commit them. Earlier in the part 1, we add all the files using “ git add . ” command. Now we are going to add files one by one. Now let’s enter the status command. We still did not commit the "second.txt" file. So, you can see it is there in the changes to be committed area. That is the staging area. Staging area is a place between your working copy and the core repository. Whenever we execute the add command on a file, that file goes to the staging area. The staging area includes the files that are ready to get committed. Whenever y...

Getting started with GIT – Part 1

Image
Lets setup git first. In simpler terms, GIT is a program that lets you to keep track of changes done to some files. First you should download and install git. You can visit the git website using this link https://git-scm.com/downloads . Select your operating system. It will start downloading git. Run the executable file you downloaded and install the software as any other software. Double click and start the git-bash.exe. You will see a command line interface.  Lets try some commands. First we are going to try a simple command git –version .  This will give the git version you are using. Setting up the account Before we set up and start our first git project, we should set our user name and email. It’s like creating an account. The reason that we need to do this is when you work with a team, every team member will make changes on the project. So, it’s better if we know who did what.So, let’s add our name. Here config means...

Arrays in JavaScript

Image
Lets explore some basics of Arrays : Arrays allows us to store several pieces of data in one place. Arrays always starts and ends with a square brackets.  Single piece of data inside the array is called as "Element". Every element in the array is separated with a comma. In Java script Arrays, we can have elements of different data types inside a single Array. What is a nested array or multi-dimensional Array? When one of the elements in an Array is another Array, we call it nested or multi-dimensional array. How to access elements in an array? We can use bracket notation to access specific element in an array. The array indexes starts from zero. So, to access the first element we have to provide 0 as the index.  This is how we access an element in a multi-dimensional array. Elements in an array can be modified. Lets explore some basic functions in Arrays : push function     ...