← Back to challenges

Find the Perimeter of a Rectangle

JavaScriptMediummathlanguage_fundamentalsnumbersgeometry

Instructions

Create a function that takes length and width and finds the perimeter of a rectangle.

Examples

findPerimeter(6, 7) ➞ 26

findPerimeter(20, 10) ➞ 60

findPerimeter(2, 9) ➞ 22
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.