Category Archives: 1.03-JavaScript

Arrays in JavaScript

Sometimes in our application we need to deal with a list of objects. For instance we might to store a list of products in a shopping cart or the list of colors the use has selected. In such situation we use an array to store that list. Let’s see how we do that- Declare a… Read More »

Object in JavaScript

We have already seen all the primitive types in JavaScript. Now let’s take a look at the reference types. In reference types category we have Object Array Function Now we will discuss about Object. Later we will discuss about Array and function. What is an object? An object in JavaScript and any other programming languages… Read More »

Dynamic Type

JavaScript is a Dynamic programming language. What it mean by dynamic language? We have two type of programming language- Static aka Statically typed language Dynamic aka dynamically typed language Static typed language In static typed language we set the variable type during declaration of the variable and it can’t be changed further. Example: In C#… Read More »

Primitive Types in JavaScript

We already learned how to declare and initialize variable and constant. We saw examples of string initialization (at here) and number initialization (at here). Now the question of what kinds of values we can assign to a variable in JavaScript? Basically JavaScript we have two categories of types they are- Primitive types / Value types… Read More »

Constant in JavaScript

Generally after declaration of variable we are changing the value of the variable as per user input or as per user queries. For example – We define a variable and initialize it to a value and log it into the console as follows- let interestRate = 0.3; console.log(interestRate); The output will show- 0.3 Then again… Read More »

JavaScript Variables

Variables are most fundamental concepts of any other programming languages. In programming we use a variable to store data temporarily in the computer memory. So we store data somewhere and give that memory location a name. We can read the data from the given location by using the name. If we consider variable as a… Read More »

First JavaScript Code

We already setup our environment. Now we are ready to write our first JavaScript code. To write JavaScript code or call JavaScript code inside HTML page we need an element called <script> </script> tag. There are two places where we can add <script> </script> element- Either add the <script> </script> element in <head> </head> section… Read More »

Setting up the Environment for JavaScript

In order to write JavaScript code we will use VSCode (Visual Studio Code). So download it from here and setup the VSCode. It is a very simple, lightweight, cross platform and powerful editor. Another thing we will install is Node from here. From here download the latest stable version and setup it as follows- Download… Read More »

What is JavaScript

What is JavaScript? JavaScript is a high-level, cross-platform, object oriented programming language. Generally this language is uses for web. JavaScript uses interpreter instead of compiler. The interpreter read JavaScript code; interpret each line of code into byte code and execute that code.  Most modern browser has Just-In-Time (JIT) compilation that compiles JavaScript code to byte… Read More »