The smaller one
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
The smaller one
Return the smaller value. An if can compare them: if a < b, return a, else return b.
Complete int min2(int a, int b): return the smaller of a and b.
Click Run to see the output here.