Ternary operator practice