The ! logical operator is breaking my head - Codecademy Race Day JS Project

I will try to the best of my ability to explain what is it that I don’t understand about the use of the ! operator, also I have provided 2 examples of the code for this project. The first is how I wrote it the second is how the tips show it to be written. Both work.

(The part I’m interested in is at the else if comparison)

My example:

let raceNumber = Math.floor(Math.random() * 1000);
let registerEarly = true;
let runnerAge = 19;
if (registerEarly && runnerAge > 18) {
  raceNumber += 1000;
}
if (registerEarly && runnerAge > 18) {
  console.log(`You will race at 9:30 am and your racing number is ${raceNumber}`);
} else if (registerEarly !== true && runnerAge > 18) {
  console.log(`You will race at 11:00 am and your racing number is ${raceNumber}`);
}
if (runnerAge < 18) {
  console.log(`You will race at 12:30 am and your racing number is ${raceNumber}`);
} else {
  console.log(`Go to the desk`);
}

The other example:

let raceNumber = Math.floor(Math.random() * 1000);
const registerEarly = true;
const runnerAge = 19;
if (registerEarly && runnerAge > 18) {
  raceNumber += 1000;
}
if (registerEarly && runnerAge > 18) {
  console.log(`You will race at 9:30 am and your racing number is ${raceNumber}`);
} else if (!registerEarly && runnerAge > 18) {
  console.log(`You will race at 11:00 am and your racing number is ${raceNumber}`);
}
if (runnerAge < 18) {
  console.log(`You will race at 12:30 am and your racing number is ${raceNumber}`);
} else {
  console.log(`Go to the desk`);
}

In my mind if I don’t write any comparison operator it automatically checks if the variable is truthy, so logically when I want to check if it’s falsy I use !== true. If I instead use !variable (like they sow) doesn’t it mean that it will always be the opposite of the boolean the variable has.

isn’t that the point

also, nothing stopping you from naming intermediary values

const registerLate = !registerEarly

and in general avoid having multiple NOT’s in an expression because you’re unlikely to keep it straight in your head

Isn’t the point to check if its false?

if you flip false then false becomes true

If you want to check whether something is false

you flip it

and then you get

is it false? true, it is false

similar to naming individual results, you can also make functions for an operation you want to use

const isFalse = b => !b

though for a boolean that’s rather redundant, because comparing a boolean gives you a boolean, you get what you already had, just don’t do it.

making a function for any operation that would be useful is a good idea in general, because it breaks the problem into two smaller pieces, each of which will be easier to solve than the overall thing

Looking back and thinking at the project code I now understand why using the ! operator works there.
Thank you for taking the time to explain it to me I hope with further practice I can get a handle on it’s uses.