<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.random.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.random</api:function-name><api:suggest>xdmp.random</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>random</api:suggest><api:function-link mode="xquery" fullname="xdmp:random">/apidoc/8.0/xdmp:random.xml</api:function-link><api:function mode="javascript" name="random" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.random"><api:summary>
  Returns a random unsigned integer between 0 and a number up to 64 bits long.
</api:summary><api:params><api:param name="max" type="xs:unsignedLong" optional="true"><api:param-description>
    The optional maximum value (inclusive).
  </api:param-description><api:param-name>max</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.random(100);
=&gt; 47
</pre></api:example></api:function></api:function-page>