Is there any faster / more efficient way to type this piece of code? Someone told me all else if’s should be arrays or something
let a = 0,
b = 0,
c = 0,
d = 0,
e = 0,
f = 0,
g = 0,
h = 0,
i = 0;
(function() {
if (a == 1 && b == 1 && c == 1) {
console.log("hello")
} else if (a == 1 && d == 1 && g == 1) {
console.log("hello");
} else if (a == 1 && e == 1 && i == 1) {
console.log("hello");
} else if (b == 1 && e == 1 && h == 1) {
console.log("hello");
} else if (c == 1 && e == 1 && g == 1) {
console.log("hello");
} else if (c == 1 && f == 1 && i == 1) {
console.log("hello");
} else if (d == 1 && e == 1 && f == 1) {
console.log("hello");
} else if (g == 1 && h == 1 && i == 1) {
console.log("hello");
} else console.log("Hi");
})();