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?
- JavaScript
- Python
- PHP
- SQL
JavaScript Fundamentals
A set of coding problems that cover the basic syntax and features of the programming language.
1. VariablesComplexity
2. FunctionsComplexity
3. OperatorsComplexity
4. Control structuresComplexity
5. Classes and ObjectsComplexity
6. StringsComplexity
7. Regular expressionsComplexity
8. Error handlingComplexity