6.
Which of the following logical operators is used to negate a boolean value?
&& (and)
|| (or)
! (not)
== (equal to)
Correct: C
The logical NOT operator (!) in JavaScript is used to reverse the boolean value of an expression. When applied to a true value, it will return false, and when applied to a false value, it will return true. This operator can be useful when you want to perform an action based on the opposite condition of a boolean value.