Skip to content

Conversation

@xetxeberria
Copy link
Contributor

No description provided.

The function just returns the desired value
* Specify the return type
* Change parameter name to licenseAmount
Write the license amount with numbers instead of letters
Each element of the array indicates the minimum amount of licenses that have to be purchased to get the corresponding unit price.

When filtering this array, the first element of the filtered array is the tier to be applied.
Instead of returning directly 299 in case of the tier being undefined, the default unit price is stored in a constant with that name
The result is the expected without changing the production code
The function throws an error if the license amount is negative
The error message now shows the invalid value
@JavierCane
Copy link
Member

A topeeeee 🙌

@JavierCane JavierCane merged commit 42130c0 into CodelyTV:master Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants