JavaScript coding challenge

Default function argument values

āœØ Your Task

Define a function area that: šŸ‘‰ accepts arguments width and height (which defaults to 10) šŸ‘‰ multiplies the the two numbers and returns the result.

āœļø JavaScript
šŸ‘‰ Press "Run" and check the result below.
Test cases
The area of 10 x 10 should be 100
The area should be 100 if the second argument is not provided

Want to try another challenge?