short circuit evaluation javascript w3schools code example
Example: js short circuit
var person = {
name: 'Jack',
age: 34,
job: 'teacher'
}
console.log(person.job || 'unemployed');
// teacher
var person = {
name: 'Jack',
age: 34,
job: 'teacher'
}
console.log(person.job || 'unemployed');
// teacher