Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (firstNum, secondNum, thirdNum) {
- if ( firstNum < secondNum && firstNum < thirdNum){
- console.log(firstNum);
- } else if(secondNum < firstNum && secondNum < thirdNum) {
- console.log(secondNum);
- } else {
- console.log(thirdNum);
- }
- }
- Или с Math.min():
- function solve (firstNum, secondNum, thirdNum) {
- console.log(Math.min(firstNum, secondNum, thirdNum));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement