Last active
December 1, 2020 10:29
-
-
Save Catevika/0d3d02f8a3061aac3d6d2a664c1349bf to your computer and use it in GitHub Desktop.
December 2020 - 24 days JavaScriptmas_challenge#1_candies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const candies = (children, candy) => children > 0 && candy > 0 ? Math.floor(candy / children) * children : console.log('For Christmas, number of children and candies must be greater than 0 to spread joy and happiness'); | |
| const result = candies(3, 10); | |
| console.log('result: ', result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment