Skip to content

Instantly share code, notes, and snippets.

@WeiChiaChang
Created October 4, 2021 01:41
Show Gist options
  • Save WeiChiaChang/3aece63e3dc74c0538a39a009c8a2955 to your computer and use it in GitHub Desktop.
Save WeiChiaChang/3aece63e3dc74c0538a39a009c8a2955 to your computer and use it in GitHub Desktop.
if (isValidTriangle(a, b, c)) {
if (a === b && b === c) {
console.log("是等邊三角形!")
} else if (a === b || b === c || a === c) {
console.log("是等腰三角形!")
} else {
console.log("是不等邊三角形!")
}
} else {
console.log("Invalid! (無法組成有效三角形) ")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment