This is my code snippet
const loopFn = function(num) {
for(let a = 0; a < num || 10; a++) {
console.log(a)
}
}
let b = loopFn(8)
console.log(b)
I know the correct way to write is a < (num || 10), I'm just curious why it causes an infinite loop instead of reporting an error.