Calcultaing Area & Perimeter with JavaScript Here I made a function that takes in two parameters (topLeft, bottomRight) which are used to calculate the Area & Permimeter of a rectangle.