short circuit javascript w3 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