← Back to challenges

Basketball Points

JavaScriptMediummathnumberslanguage_fundamentals

Instructions

You are counting points for a basketball game, given the amount of 2-pointers scored and 3-pointers scored, find the final points for the team and return that value.

Examples

points(1, 1) ➞ 5

points(7, 5) ➞ 29

points(38, 8) ➞ 100

Notes

N/A

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Basic Variable Assignment