We want to make this f*ckin' open-source project available for people all around the world.

Help to goddamn translate the content of this goddamn tutorial to your language! Hot damn!

back to the lesson

if (a string with zero)

importance: 5

Will alert be shown?

if ("0") {
  alert( 'Hello' );
}

Hell yes, it will.

Let me tell you somethin': Any string except an f*ckin' empty one (and "0" is not empty) becomes true in the logical context.

We can run and check:

if ("0") {
  alert( 'Hello' );
}