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