a value is said to be "truthy" when it follows the true side of an if block.
A "falsey" value follows the false/else side (or at least doesn't follow the true side if you don't have an else).
Every language has its own decisions about which those are (in some languages, only true and false are truthy or falsey, and using any other value as the test in an if statement is an error).
An example of truthiness in action would be this python snippet
if(5):print(5)
Or in ruby
if55end
Both of these will show 5, even though neither value was "true".
For javascript, a good reference is MDN, but you'll definitely want to check each languages documentation for truth when you start using them.
Other languages might have different ideas about what's valid for if conditionals. Some treat 0 as falsy, some treat an empty array as falsy, some consider an empty string as falsy, some treat a pointer to nothing as falsy. Some only treat false as falsy, and everything else as truthy.
For further actions, you may consider blocking this person and/or reporting abuse
a value is said to be "truthy" when it follows the true side of an
if
block.A "falsey" value follows the false/else side (or at least doesn't follow the true side if you don't have an else).
Every language has its own decisions about which those are (in some languages, only true and false are truthy or falsey, and using any other value as the test in an if statement is an error).
An example of truthiness in action would be this python snippet
Or in ruby
Both of these will show 5, even though neither value was "true".
For javascript, a good reference is MDN, but you'll definitely want to check each languages documentation for truth when you start using them.
Other languages might have different ideas about what's valid for
if
conditionals. Some treat 0 as falsy, some treat an empty array as falsy, some consider an empty string as falsy, some treat a pointer to nothing as falsy. Some only treat false as falsy, and everything else as truthy.