Returns one of N items at random.

Usage සංස්කරණය

  • {{random item|item1|item2|...|itemN}}
  • All calls to the function using |same=y with the same number of items will return the same item.

Parameters සංස්කරණය

  • |1=..|2=..|N= --> The items to return.
  • |same=y Set to a truthy value for all calls with this parameter set and the same number of items to return the same item.
  • There use to be a |range= parameter, but this is no longer needed.

Examples සංස්කරණය

විරේචනය

  • {{Random item|a|b|c|d|A|B|C|D|1|2|3|4}} --> a
  • {{Random item|a|b|c|d|A|B|C|D|1|2|3|4}} --> b
  • {{Random item|a|b|c|d|A|B|C|D|1|2|3|4}} --> C
  • {{Random item|a|b|c|d|A|B|C|D|1|2|3|4|same=y}} --> a
  • {{Random item|a|b|c|d|A|B|C|D|1|2|3|4|same=y}} --> a
  • {{Random item|a|b|c|d|A|B|C|D|1|2|3|4|same=y}} --> a

See also සංස්කරණය


"https://si.wikipedia.org/w/index.php?title=සැකිල්ල:Random_item/doc&oldid=512050" වෙතින් සම්ප්‍රවේශනය කෙරිණි