Question 1 of 30
In a software development project, a team is tasked with creating a function that calculates the area of a rectangle. The function should take two parameters: the length and the width of the rectangle. The team decides to implement the function using JavaScript. Which of the following implementations correctly defines the function and returns the area?
`function calculateArea(length, width) { return length * width; }`
`function calculateArea(length, width) { console.log(length * width); }`
`function calculateArea(length, width) { area = length * width; }`
`function calculateArea(length, width) { return length + width; }`

Preparing for Microsoft 98-382 Introduction to Programming Using JavaScript? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free