Now with node, we have the option of using JavaScript or Typescript.

Now the documentation for node and

also express that we will see later, all use standard JavaScript.

So I have defaulted to using standard JavaScript in this course or

ES2015 JavaScript in this course.

If you prefer to use TypeScript,

you can set up your node examples to write your application in TypeScript.

But then you will have to transpile that code into JavaScript so

that it can be run using Node.

So you have to set up additional infrastructure

in order to be able to use TypeScript.

In this course, I am going to use JavaScript as the default language for

the rest of the course.

And I'm not going to go into Typescript use it in this course

when nodes start supporting Typescript natively,

then it makes more sense to move to Typescript [INAUDIBLE].

But if you are interested in Typescript,

I have noticed that there have been several blog articles posted by different

people that illustrate how you can set up your Node application to use Typescript.

Having said that, let's return to the index.js file and

then continue with our example.

So I'm setting up a perimeter here and then also an area function here.

Again, taking two values, x and y,

which represent the length and the breadth of the rectangle.

The two parameters, and the area is computed as x times y.

So from your primary school mathematics,

you know how to compute the perimeter and the area of the rectangle.

So here, I have set up this JavaScript object here and

then let me define a function here named solveRect,

which takes two values, (l,

b), as the two parameters, the length and the berth of the rectangle.

And it is going to use this JavaScript object that I have defined

earlier in order to compute the perimeter and the area of he rectangle.

So inside here,

let me do a console.log and

say Solving for rectangle with l equal to