does short and work in js 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