In JavaScript, how are AND/OR operators actually handled? I'm wondering which of these are more performant or if they do to the same thing internally:
Example A
if ( conditionA && conditionB ) {
// Do something
}
Example B
if ( conditionA ) {
if ( conditionB ) {
// Do something
}
}
Will example A only evaluate conditionB if conditionA is truthy, or will it always be evaluated, hence taking longer to perform (in the case that conditionA IS truthy) than example B?