Ruby Randomly Select Items in a List

preview_player
Показать описание
In this example we try to give you a simple example of making a random section from a list of values in Ruby. We can use this to generate a weekly menu. Using an array we have a list of meals we can cook. We make a random section each day for the meal to cook on that day. To ensure we don't eat the same meal each day we remove the random selection from the list on each itereation

Рекомендации по теме
Комментарии
Автор

Wow, this was really neat and a lot easier than I was expecting hahaha, thanks.

DenzelBraithwaite-LBPSB