fucntion test (){ var weekday = [ , 'mon','tue','wed',''thu','Fri','Sat',‘sun’ ] weekday[day] !== undefined ? console.log(weekday[day] ) : console.log('i don/ t know') }test(0)