1.
Fix the errors so it runs and returns the perimeter of a rectangle.
areaTriangle
function below was hard coded so it always uses 5 and 4 for the base and height of the triangle. Modify the function so that it has parameters for base and height and works to calculate the area of different triangles.approximateSqrt
function that takes a number and a guess as its parameters and then uses Newton’s formula to estimate the square root of the number.