18

What's this then?

private function pick():void {
    var sample:Array = ["Coconut", "Chocolate Covered Peanuts", "Caramel",
        "Chocolate Covered Almonds", "Chocolate Whip", "Pecan & English Walnut Cluster",  
        "Molasses Chew", "Messenger Boy", "Almond Nougat", "Cashew Cluster",
        "Chocolate Truffle", "Toffee", "Cherry Cordial", "Maple Fudge"
    ];
    var i:int = Math.random() * (sample.length) + 0;
    var existence:String = sample[i];
}
Gowtham
  • 103
  • 2
Chowzen
  • 25,660
  • 5
  • 57
  • 220
  • Just to be clear, this is written in Actionscript3, which may pass by value, pass by reference, call-by-sharing, call-by-object, or call-by-object-sharing (which is a special case of pass-by-value).. :) – Chowzen May 24 '16 at 04:08
  • Gee, I hope I don't get "Messenger Boy!" – Chowzen Jun 05 '16 at 07:50

1 Answers1

23

It's something my mother used to tell me:

Life is like a box of chocolates. You never know what you're going to get!

Explanation:

Life is a synonym for existence; the array is the box of chocolates; picking a random one basically means you don't know what you're going to get; and the quote is from Forrest Gump.

paste
  • 3,305
  • 16
  • 33