0 votes
in JavaScript by
 What's the output?
!!null;
!!'';
!!1;
  • A: false true false
  • B: false false true
  • C: false true true
  • D: true true false

1 Answer

0 votes
by

Answer: B

null is falsy. !null returns true!true returns false.

"" is falsy. !"" returns true!true returns false.

1 is truthy. !1 returns false!false returns true.

Related questions

0 votes
asked Mar 10 in JavaScript by DavidAnderson
0 votes
asked Feb 27 in JavaScript by DavidAnderson
...