export const min = (a, b, c) => { let minNum=0; if(a<b && a<c)minNum=a; if(b<a && b<c)minNum=b; if(c<a && c<b)minNum=c; return minNum; } Test-3 is failed. The output is ok. What is prob with the above code?
codyfreelancers the problem is the case when a equals b and/or b equals c.
a
b
c
export const min = (a, b, c) => { if (a > b && b < c) { return b } else if (b>a && a < c) { return a } else { return c } } this could be the solution because it worked for me