I can't figure out if -1 is true or false in javascript, when I use indexOf.
let a = 'abc'.indexOf('abc');
let b = 'def'.indexOf('abc');
console.log(a); // 0
console.log(b); // -1
console.log(!a); // true
console.log(!b); // false
Why are the last two lines giving true/false?
From what I understand only == allows for type converting, since (=== is strict)
Is (!a) and (!b) using (==) internally somewhere?