Ruby - Control Flow
You want to write a Ruby case/when statement that prints "Weekend" for Saturday and Sunday, "Weekday" for Monday to Friday, and "Invalid" for any other input. Which code correctly does this?
You want to write a Ruby case/when statement that prints "Weekend" for Saturday and Sunday, "Weekday" for Monday to Friday, and "Invalid" for any other input. Which code correctly does this?
when 'Saturday', 'Sunday'.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions