Truthy and Falsy

Hello, i am getting confused with truthy and falsy statements i need some explaination, could anyone assist me.

Not able to understand short circuit evaluation

Essentially every single data type has a “truthy” or a “falsy” state, which can be used for conditional statement. So if something is “truthy”, then it will evaluate as if you were using the boolean data true and likewise with false.
Of course the simplest example would be the boolean data type, where true is truthy and false is falsy. For integers, 0 would be falsy, which means that if you have

let num = 0

if (num) {
 console.log(`This is truthy`)
} else {
 console.log(`This is falsy`)
}

Then this would print This is falsy to the console, as 0 operates as if it is the boolean false. If you then changed num to be a value, say 5, then it would print This is truthy to the console instead, as 5 has a value and as such is treated as if it is the boolean true. It just gives us an easier shortcut for optimising our code, as you can write just a variable name, instead of a full condition.

Hey Adam, Thank you i got diff between T/F’'lys.

Well Appreciated for sooner response.