Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function solution(n1, n2, n3) {
if (n1 > n2 && n1 > n3) {
console.log(n1)
if (n2 > n3) {
console.log(n2)
console.log(n3)
} else {
console.log(n3)
console.log(n2)
}
} else if (n2 > n1 && n2 > n3) {
console.log(n2)
if (n1 > n3) {
console.log(n1)
console.log(n3)
} else {
console.log(n3)
console.log(n2)
}
} else if (n3 > n1 && n3 > n2) {
console.log(n3)
if (n2 > n1) {
console.log(n2)
console.log(n1)
} else {
console.log(n1)
console.log(n2)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.