JS if else exercise w/ a ternary statement