SHARE
TWEET

Select

tomuwhu Dec 9th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let s="Kedd", ind,
  2.     t=['Hétfő','Kedd','Szerda','Csütörtök','Péntek','Szombat','Vasárnap']
  3. console.log( (
  4.     ind =   t.findIndex( e => e===s ),
  5.     ind ===-1 ? "Nincs ilyen nap":
  6.     ind <   4 ? "Hétköznap":
  7.     ind === 4 ? "Mindjárt hétvége!":
  8.                 "Hurrá hétvége!"
  9. ) )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top