{"name":"selectMin","title":"selectMin","type":"command","url":"https://community.bistudio.com/wiki/selectMin","revid":377100,"updated":"2026-01-01T09:58:18Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns the array element with minimum numerical value. Engine solution to BIS_fnc_lowestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only. Booleans however are also supported and will be evaluated as Numbers: true - 1, false - 0. nil value treated as 0.\n\n> [!WARNING]\n> Other non Number elements (not recommended) will be evaluated as 0 and **Bad conversion: scalar** message will be logged into .rpt.","syntaxes":[{"syntax":"selectMin array","params":[{"name":"array","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number","description":"element with minimum numerical value"},"form":"unary","right":{"text":"array"}}],"examples":[{"code":["_min = selectMin [1,2,3,4,5]; //1"]},{"text":"```sqf\n// Same as, for example:\n_min = _a min _b min _c min _d;\n// Only faster:\n_min = selectMin [_a,_b,_c,_d];\n```","code":["// Same as, for example: \n_min = _a min _b min _c min _d;\n// Only faster:\n_min = selectMin [_a,_b,_c,_d];"]}],"see_also":["selectMax","min","max","selectRandom","select","selectRandomWeighted"]}