Javascript Function Creation Question 1

Introduction

Write code to calculate the area of a circle

// Calculating the area of a circle

//your code here

console.log( circleArea(9) );



// Calculating the area of a circle
function circleArea(radius) {
    return Math.PI*(radius*radius);
}

console.log( circleArea(9) );



PreviousNext

Related