js choice function code example Example: js choice function >>> import random >>> random.choice(['red','green','blue']) 'green'