Last active
December 1, 2020 10:29
-
-
Save Catevika/0d3d02f8a3061aac3d6d2a664c1349bf to your computer and use it in GitHub Desktop.
Revisions
-
Catevika revised this gist
Dec 1, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ 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) -
Catevika revised this gist
Dec 1, 2020 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ const candies = (children, candy) => children > 0 && candy > -1 && Math.floor(candy / children) * children; const result = candies(3, 10); console.log('result: ', result) -
Catevika created this gist
Dec 1, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ function candies(children, candy) { return Math.floor(candy / children) * children; } const result = candies(3, 10); console.log('result: ', result)