yorlang
yorlang copied to clipboard
Max min branch
Adds Maximum and Minimum helper functions
o_kere_julo(Minimum)
o_kere_julo returns the minimum number in a list of numbers
o_tobi_julo(Maximum)
o_tobi_julo returns the maximum number in a list of numbers
both functions takes an array or numbers separated by a ',' as argument if the first argument is an array, the function automatically ignores the other arguments and computes the max or min number in the first argument array.
Usage
var max = o_tobi_julo(34, 22, 56, 24, 4)
max = 56
var min= o_kere_julo(34, 22, 56, 24, 4)
min= 4
var min= o_kere_julo([34, 22, 56, 24, 4])
min= 4
var max= o_kere_julo([34, 22, 56, 24, 4], 45, 545, 45, 445)
max= 56
all other arguments are ignored only the first array argument is recognized
it should be note that var
in the code snippets will be replaced with jeki
if to be used in Yorlang
i thought variable declarations are done with jeki
not var
?
it should be note that
var
in the code snippets will be replaced withjeki
if to be used in Yorlang
okay.
Please add test cases for your code before i leave a review
Hey @anoniscoding I followed the guidelines you gave above and updated the helperise eyiToKereJu
and eyiToTobiJu
and I deleted the file you asked me to. Kindly review again. Thanks
I optimized the functions, I added more test cases as you requested and I registered the two helper functions at registeredHelperise.js
which is now causing conflict. Kindly review again. Thanks